Fix negative mass and pseudorapidity/rapidity confusion, and remove unnecessary sorting of jets