Throw exceptions on failure; remove unused _error function
Add more tests