Updates replacement sets. Added unique method to make sure that no duplicate keys were entered during expansion.