Refactored to use ng-boilerplate along with ui.router