Changed Point2D[] to ArrayList<Point2D> to remove null pointer
references