First implementation.

It's missing tests and documentation for the exception classes.