Changes to demo init function