Added support to list of stations as input
Adapted to support list of stations as input
Moved generate_all_segments to global scope
Fixed mistype
Fixed mistype and added comments
First version of calculate_segment_rank, needs testing