fixed heap.insert
Remove old code