refine the whole struct of engine source code.