Begining corrections of memory management