Create unit test for modal_networks module and rework railway_cost for track cost methods. Modify classes in modal_networks module to be more testable by allowing to pass a builder.