Added back hard_trimming option.