refactored Heap, fixed multiple bugs, improved automatic gc
bugfix: wrong offset calculation
remove unneeded debug output
fix bugs in tests