preferred itag ordering: Increase readability

Previously we used abs() to check how far each index was away from the
desired index. The code was not so bad, but it still looked fairly
cryptic at first glance. The new version uses itertools and slicing,
which should be far more readable to most Python programmers.