Refactored map