added a method to convert an array to a list of points, cleaning it up as you go