Along the way clean up a lot of the formatting of the auto-generated code to make it a bit prettier by default.