A minor refactoring of the `cleanup` build action