Updated add/remove reference

AddReferences was renamed to AddReference and now accepts arguments
instead of always adding the same reference. Similar changes were made
to RemoveReference.