Added sort arrows and accompanying logic.