Re-wrote and now uses key, value entry points!

Signed-off-by: DavidJohnGee <david.gee@ipengineer.net>