refactor out template parameter KeyStore from class Variant