Changed how memory allocation/deallocation functions are specified