Prevent duplicate points
Remove debug code