Simplify registration

This branch has changes to try to simplify the registration code a bit.