Cleanup of phase2