jslinted most of the javascript code