Added a generic heap implementation.