Yep 3DGS is not designed as modules, you'll have to re think all programming core.
But from a programming perspective i don't think it is good ??
So there are Two while functions, i odn't think this is optimized ?
I'm sorry, but your posts are absolute bullshit, to put it mildly.
If you make performance claims, back them up with profiler results! Premature optimization, especially done by people who explicitly claim to not be programmers, are the worst. DON'T do that!
You propose to exchange literally no performance gains whatsoever for hard to read and maintain code.
For the future: If you think some piece of code has performance issues or is unoptimized, run it through a profiler! Don't try to optimize prematurely, it will only cost you time (in your case also make the code unmaintainable) and won't give you anything in return.