Use the new Registry

And hopefully fix the test error(NEVER  reference main code from the
API!)