If there are 28 files with thousands of lines of code there is no way I can learn the code in any sort of reasonable time.
You need to produce some debug data of some sort, you can't expect anyone to understand your code and determine what is wrong with it with no help. What we need is a I did this expecting that and got something else. All that in debug print statements.
I am done for now.