cleaning up auto-register code to differentiate old and new codepaths