replaced references to variable model, added newidfobject command, new save () function