Initial code cleanups and formatting changes.