Cleaned up the error messaging system