Fixed a bunch of jshint bugs/warnings, changed model for text2js