Refactored gauge and grid controllers. Moved the aggregation logic to Service,js