Add code in heap.cs so that it can return necessary actions.