More refactoring.
Refactor factory to not exec the resolved module.