Updated the router to use ui-router