converted in place modification stack structure to a clos object.  That way I can extend it when I need to in searches like lds.
first hack at lds