Formatting changes, comments, and a few code mods