code style: When testing with type(), use is to compare, not ==.
Data: Added a copy constructor.