Clean up error display code