Some changes to the Sorting system and barrel fixes