Make a better registration process

See #134