From my view, but I may be wrong, your code is substantially modified from the original Flynax code.
I suggest you hire a developer experienced in Flynax script to guide you in finding solutions to the various issues you are facing.
When I started 15 years ago, I also wanted many, many modifications; however, I learned it is not for the best, unless you hire a developer.