Use meaningful errors. Fixes #20.