Refactored demo