Cleanup code formatting and jshint errors

I redid some of my changes from yesterday on top of master, along with more code formatting and jshint fixes, mostly missing semicolons. Will work on colored console output separately.