Most of the core code for sequential intersection.

-There's a bit left to do, I've marked with TODO's.
-The bug I can't figure out is also marked with a TODO, see index.html
line 306.
-Too tired to keep working.