Fixed memory leak
Optimized map rendering

Now map renders only visible tiles, not the whole map