Struggling with multiple source files to keep code separate

You are very welcome. One more thing: What you are doing now is called refactoring. Actually the development cycle should be (without unit testing):

  1. Write (possibly bad) but functional code (backed by unit test, but that is a little hard on the arduino plattform, especially with external stimuli)
  2. Put on the refactoring hat: Now you are only refactoring the code for better readability and better structure. You may not write a new function or code in the middle of refactoring (because then refactoring will be postponed to "later" (e.g. never)).

For your sanity you might want to take a look at a versioning program like git(!) or subversion. You check in your working copy, create a new branch and start refactoring. This way, when nothing works anymore, you can always revert back to before refactoring and start over.

In addition, you should create a library to encapsulate parts of code, that go together (like you have done with your RemoteSign that wraps the WifiServer class for better readability). Don't create a big library which does everything.

Happy refactoring!

Git doesn't keep me sane.

But yes, version control is very useful even for a small project with one developer. A year from now you are going to want to review the code on the device and it's soo amazing to be able to easily revert back to a particular version at a particular date.

I use Subversion because I find it easier to wrap my brain around than Git.

yes indeed, that is what I did.... got it working, now refactoring before it gets out of hand.

I also use source control (Atlassian SourceTree + bitbucket). I have many thousands of lines of VB6 code that runs my train layout and I work on two machines, one in my study and one at the layout. Source control lets work on both systems and allows me to blame the other guy for regressions.

I dont have formal unit tests but I do code test code test code test.

I intend creating a mini RemoteSign on a small OLED display that shows train arrivals and departures and will interface with the train layout software and https://remotesign.mixmox.com/

I am extending RemoteSign syntax to also control ceiling lights, etc. too.
I also plan on adding support for Blynk via RemoteSign.

Next task is to find out how to pass in an array of a struct to my class.....

I am happy to report that I have finished the refactoring and all my code is back into my main project and running well as a class. Thanks to all those who helped!

I learnt plenty!

the working results can be seen at RemoteSign: RemoteSign ESP
again thanks to all who helped...