Cleanup hash

They have some enhancements and some test coverage improvements.