Replaced local vars with a hash map.