Merge with non-overlapping temporal pooling, clean-up code