Refactor angular application