Refactor/exceptions

Exceptions can be much simpler, also, make use of namespaces.