Feature add heap

this will need rebasing, it assumes #30 will be merged first