Demo refactoring for better readability