Added processing function to hash maps.

I should really clean this up and get rid of the code duplication.