Probably it's easier to work with multiple functions and use exceptions for the error flow.
Will send you some refactoring ideas later on.

Lets first get the docs in place so people can start using this :)