Added heap and some unit tests.