Added testing code for heaps