Clean up of hashes in ruby