Fix target generation and scripting for the demo