Adding comparison functions for system_idx and event_idx, as well as duplicate
comparison functions