restructured app.js into modules -> config.js and states.js