Minor tweaks to documentation and tests
Added tests corresponding to the examples in the readme