Refactored code for option elements to use ng-options