* Additional error checking
* Throw to terminate on error
* Improve documentation