Refactoring the interface for loading mock modules.