refactor: use $timeout and $interval

- testebility
- no need for explicit $scope with phase check