Changes to databases caused by testing Rail program
Further bugs caused by separating locos and trains fixed
Renamed critical section variable