Jkarni/cleanup - don't merge just yet

Sundry cleanup and stylistic changes that I'll leave open as a PR so everyone can more easily see the diff on github itself.