Demo refactoring