significant refactoring of the engine factory and engine config layer