Refactoring to make it easier to demo