Move parts of application to angularjs