lots of lint-friendly cleanup, stray spaces, needed semicolons and whatnot