Add build heap functionality.