memory cleanups
memory cleanups
merged for memory cleanups