Now nearly working with 2 trains and a tram. One race condition over control of the motor to deal with.