Extracting methods to explain code
Implementing path length calculation for RSL and LSR paths.