Sustainable copper refining