Introduce ngRoute and clean-up location handling

This change introduces angular-route and cleans up handling of the 'active'/'completed' state. The benefit here is the cleaner separation of URL handling from the controller.