Initial implementation of Edge.

TODO: Refactor the #intersect. It's pretty long and is doing too much.