Thank you. Yes it is running better but the code is still a bit wonky. I think I have figured out where the error is but I have not uploaded the new sketch to the Uno yet as this one runs pretty good as it sits. I do need to revise the wiring underneath and make a few other adjustments but it's coming along nicely. This is just a test bed really for a more complex system I want to build. I want to completely automate a multiple tram system that will allow 2 or more trams to be able to run independently on the same line at the same time, keeping track of which tram is at which stop and what the next stop is for each tram, and also allowing for a few other features like a "all stop" and or a "home". All stop is obvious as to what it does, and home will set the system to return the trams to a per-designated starting location. Oh and because of the limitations of the Kato trams I am going to be keeping this all DC.