Added jshint and did code cleanup