Finished step 5b implementation.

Contains at least one bug to be fixed concerning computing the tether
segments.