Found a real logic error in the Train module. Plus lots of little things. Adding documentation to Layout.
Woke-up this morning with the real answer! The real problem is software analysis not coding. Earlier while working on the hardware I wrote the train module software based on the simulator. The simulator written in PHP used the same software to process each train, sequentially, step-by-step cycling through each train. The laptop program written in python used "copies" of the same software to process all the trains, in parallel, as the OS switches control from one instance (copy) of the software to another. As a result of this faulty analysis the current software is to convoluted repeatedly doing thing that are not needed and therefore SLOW. So need to start over with the train module 2.0.
Also need to make changes to module TT4 handle these changes and moving from system state 0 through 6.