Angular refactor for original functionality complete