Memory cleanups added