Clean up code and comments a bit.