Fixed bugs. Center of gravity would not work. Switched to triangle inequality.