Removing javascript from framework to app.js