remove redundant $scope.apply functions