Added in heaps to the equation. This seriously speeds things up, although
this is still no match for a quick or merge sort. Also I need to clean things
up and add some comments. But it works (even if it still has some debug output)