Refactor to angular ... continued