Refactor error messages.
Add documentation.
Add a reference to the lincense in the README file.