Refactoring Demo Code