Fixed #7, reversal of the comparison operands strikes back...again... (Should help with #6 too.) Also added some tests for the priority queue.