Improvements to API and functionality (fixes #6)

This is squashed changeset of #6. It was a slightly messy conflict, so hopefully I have resolved everything that is required. If you could have a quick read of it would be good. (/cc @unclecheese) 

If there is formatting issues, or I didn't properly merge then feel free to contact me.