updated
updated test class to use new _keys
added checking for keys before setting them or deleting them