Added TPrim, the corrected algorithm to use to find orderedPoints
fixed merge conflicts