Refactored tile_available while block