Implemented an Object in place of HashMaps