Changed locals to hashmap.