Refactor map drawing into different modules.