Cleanup bunch of jshint warnings
Reformat code