Refactor
Added weight for sorting purpose
Added ng-grid as editor
Refactor existing code