initial version of the optimal bitonic tour + some misc cleanups