Using LinkedHashMap for swaps

Replaced the HashMap with LinkedHashMap for swaps, to preserve the order
of elements as loaded from remap files.