Adding read register functionality.
Adding write reg for key.