Add function to clear and flush tiles.