Moved every thing to the app.js into angular controller