Started work on line detection of polygons
TODO: Debug not quitting sometimes