[build] nabled strict aliasing
[refac] refactorized the core functions of the layer system