Improved the Map implementation.