Refactor Angular stuff