Added copy constructor, implemented equals and hashcode methods