Add record replay opportunity
A little bit of refactoring