Added a little documentation and moved exceptions into namespaces