[Reviewer: Andy] Registration fix

The first commit is some code review feedback I didn't push, so you should ignore that and focus on the last two.