fix for #7, additional test coverage, updates to documentation, improved PDO error output, function returns added