tests for .error_messages, plus restructure of method