Refactored map to it's own class.