Changed way classGroup clashes are detected
Added duration to clashGroup