Reformat some code to be more readable