Map resize refactoring