refactored greedy implementation
added optimization that removes intersected edges
added some tests for crossed edges optimization