Please always use braces for if statement bodies, even if they're only one line. (This code was a total mess before and didn't come close to obeying the style guide, but since this is a big change it should be just right--so I'm making a bunch of nitpicky style comments).