Starting unit testing. Clean up some jshint issues