Namespaced class and moved exception classes to their own files.