Clean up error handling and messages