-> Remove memory allocation bugs -> Merge changes from upstream, enabling customizeable memory allocation