Undid attempt to use functions as heaps.