make minimumPointsDistance an option to cleanfigure()