Clean up some error displaying code.