re-working registration definition

Includes Aaron's most recent pull request too.