Change-Id: I7e271945e8d636b08e384f09359ad8aebf708103
add unit tests make the code more readable make it more robust to various error conditions report errors and performance metrics appropriately Co-authored-by: tbjump jumpsiegel