Refactored tile loading to TileLoader.