Adds support for registering and unregistering.

The library now exposes the complete functionality of the
register and unregister API.
Updates the documentation to reflect new options.
Merge pull request #6 from eelcocramer/master

Exposes full features of register / unregister API