Mostly stylistic changes to the code and comments