Extract Schedule and StopSchedule into separate module. Convert to python 3