addNewConceptsToExisting - seems like it's manipulating $scope, but in an ambiguous way - a local variable is assigned ("existingConcepts") and passed to the method, which then manipulates the in parameters, which is secretly a pointer back to scope. My preference would be to treat the in-parameters as immutable, and then return the union. In fact, the whole thing can probably be boiled down to one or two lines using something like _.union (we should consider pulling in the underscore library, if we haven't already done so)