Rewriting everything - Cleaning phase