Changed angular.extend instance of extend