Added error handling, tests and updated co

Uncaught exceptions are passed to next(), co updated to 1.5.1. Bumped
version to 0.3.1.
Merge pull request #3 from litek/master

Added error handling and updated co