Initialize engines and tabs using a generalized logic.
Add test coverage