Simplified tests and corrected priority emitter sorting