text base cleanup