Add documentation and minor code-refactoring

`Handler for registration failure events`?