First stage of cleanup