cleanup chapter generation