Code cleanup

The code now uses consistent styling, spacing, formating, etc.