make direction_from_item() return the normalized item
avoid duplicate call to get_orderby_key()
introduce get_adjacent_items()