Refactor TileMap