demo, compiler: Move the rest of DemoModel functionality into the relevant classes.