Angular refactor