Reason to registering

Closes #197

Accidently contains commits from other pullrequest.