Added sort functionality to inventory page