More work on the registration, far from done. Need to add some tests later for it too