New refactoring to ease in-memory testing