Refactor copy constructor