Added copy constructors and corresponding tests.