Add intersection of intervals and frames.

FIX TESTS.