Clean up the code a bit.