Define several useful error types
Clean up error types