UPDATE: Rename class_mode to relation mode