Merge modules

Apparently the merge with my new itinerary generator code didn't go entirely as planned. This pull request should fix that. It also includes the changes contained in pull request #1196.