Clean up treatment of hashes a bit and fix a typo.
Polish things up a bit for a more correct flow.