Fixed structure of app.js and removed test code