Clone logic for DemoController.