Many style cleanups and a couple minor fixes