Simplified bbstree total order relation attribute
Refactored line segment comparison function