Put map redraw and clear into separate functions.
Rewriting the buggy map scaling.
Fix performance bug (and clean the rendering code): Store the rescaled tiles while panning.