Refactored errors.
Merge pull request #5 from jussi-kalliokoski/refactor-errors

Refactored errors.