Modularize the engine (more or less)