Added some of the KeyValues parsing logic