Remove sort priority related unused code