Tidy the engine for master branch.

Note you can probably cherry-pick this into the other branches just change to correct dependencies.