Clean up user/kernel copy functions.