Improve documentation and examples

Fixes #4