Fixed a bug, added a test program
Merge branch 'master' of https://github.com/mfdeakin/heap