Cleaning up MBR registration code