Add jshint. Cleanup code accordingly