Cleanup unused code in registration