Clean code

Various spacing and other miscellaneous fixes.