fixed errors from checking app.js by jshint