Added search
Added ng-switch statements for power control