Refactoring and ng-grid