Fixed rerouting of trains. Also added a small fix in the TrainController to check that the current speed is less than either the commanded speed or speed limit