debugged all errors.

- reconfigured first junction to always point to the start of the path.
- added Cell variable midCell to indicate the cell you are jumping over.
- simplified code work with use of local variables at multiple
locations.