Correcting HashMaps

Correctly declaring HashMaps to ensure code clarity and correctness