Latest code. Added code to control multiple trains