Integrate angular-ui-router.
Finish porting to requirejs and ui-router.