Fix JS to not replace entire table. Fix SortUrl bug