Moved stuff from convexHull.js