Fixed Copy function to use new class