Refactored copy stage. Still needs improvement.