update

implementing new threading construction, and cleaning up memory stack.