Cleanup and add some more exception wrappers