refactoring app to use angular