Moving key store out into its own classes