changed app.js to oop

Changed app.js to oop