Refactor lookup argument shuffling