fixes, added tests
Fixes. Big test works now.
more fixes, larger test
fixes and new tests. very large random polygon test passes