Simplify and optimize commit clean operation