TODO: rename error_conditions{} to something more generic; create separate error and maint tables inside that?