seperated json code and simplified app.js file