Implemented HeapSorter. Fixes #6
Fixed an issue with the tros() functions