refactor mesh controller copy functions