Implemented keyExists and partially implemented add.