clean_workspace_optimized