added cleaning up of points

clipper's cleanup is buggy, so I added a simple function to do it
myself.