Updated key manager

Started playing around with a getKey method.