Splitting out the demo_ui class and demo functions