Fix a bug in Tiles and remove some redunduncy