Add demo; fix in-loop instantiation