Restructured the handling of TileData to make it more extensible and flexible.