Tests

- [x] Simplified examples
- [x] Test suite substantially extended

Fixes #3.