[cleanup] internal rework #3
[cleanup] internal rework #2
[cleanup] internal rework #1
[cleanup] improve elements classes generation (with a few more checks)