Lp#1411422: Clean up the code a little bit.