shared pointer fixes to prog demos
minor fixes