Cleanup the code.

Make the code more consistent and match newer code styling trends.