memory alloc fixes, functions name change