Added code for determining whether bonds intersect.
Trying to fix bond intersection...