Updated dynamic demonstration system to support setup, prepended and appended code