some refactoring to add a pure virtual clone function to the Key class