Changinf implementation of transferKeys(fromKey, toKey, .. ..) to
account for fromKey< toKey and viceversa.
Untested.