Improved and advanced sorting by cat and location