Various minor cleanups and formatting