Added documentation and an example usage.

Fixes #2