fix performance issue with angular.copy (replace with underscore.extend)