Remove old sorting code