Sorting codes are reusable

Overloaded with unique sorting
Handled zero/negative listing number