Restructured the tile type system.