Restructuring the Map container for better encapsulation.