delete unecessary sections and terms