NikolAngularJS refactor