Added heapfile functions