Ed: Move parsing of start/end_time and headways out of the loop