generally tidied up to make more usable
added example usage
Merge pull request #1 from itrharrison/master

merge updates