Added deletion of duplicate points, because untidy algorithm can wrongly
drop long thin lines. I should fix wrong algorithm.