Adding base infrastructure for supporting different heap implementations. Still very WIP