Split JS out of Listing page and add feature to sort columns