Minor: Doing the composition in a saner way.
Added heapsort and a few tests. Things are terribly broken :(