KVP Utility Code

Needs formatting and Code Check