Added ability to return a hash of hashes instead of an array of hashes