Finished heap implementation