Inessential parts of extensions of first-order theories