Improve usage of ui.router with "resolve"
Improve JavaScript coding style

To comitted code now passes the Airbnb pattern using jscs