Refactor, rename and add new function

Ran into an issue where I needed to extract a subhash from an existing
hash.  Created new function.  Also renamed old hash_values function to
more clearly reflect what is going on.