Sales sorting implemented, with restricted numbers of stack sizes.