Simple table sorting script without all the heavy features