[engine]Header reorganization, additinal preprocessor checks