Tidy the hell out of registration code. #13

This needs to be its own commit with its own diff for posterity.