Turned into class and moved functions from CoinKey