Updated various key,value functions to reduce user end coding. This will be changed to work more generically in the future.