much more efficient sorting of vertices, although it may not be working quite yet.