Implemented key and keys with tests