More cleanup, examples and tests.
Merge pull request #14 from markhibberd/topic/specs

More cleanup, examples and tests.