foldl cleanup