Fixed some javascript lint to follow the jshint recommends.