Modified object copying to use deep copy via the copy constructor rather than the shallow copy provided by Javascript array slice(). Also renamed the set() methods to copy() to reflect that they are performing a deep copy of the object.