FIX: Fix indexing?

@dengemann see if this indexing makes sense to you. I had a hard time parsing exactly what the previous algorithms were doing (even though I worked on them earlier), hopefully this makes sense to you. It should bring `epoch_idx` into alignment with `events` better.