Added ability to use custom allocators

This will be necessary for testing storage folding