; but for purposes of this section allowances under section 167, and allowances under section 611, shall be considered as expenditures. (2) Exploration expenditures This section shall not apply to any expenditure paid or incurred for the purpose of ascertaining the existence, location, extent, or quality of any deposit of ore or other mineral (including oil and gas). (3) Software development For purposes of this section, any amount paid or incurred in connection with the development of any software shall be treated as a research or experimental expenditure. (d) Treatment upon disposition, retirement, or abandonment If any property with respect to which specified research or experimental expenditures are paid or incurred is disposed, retired, or abandoned during the period during which such expenditures are allowed as an amortization deduction under this section, no deduction shall be allowed with respect to such expenditures on account of such disposition, retirement, or abandonment and such amortization deduction shall continue with respect to such expenditures. . (b) Clerical amendment The table of sections for part VI of subchapter B of chapter 1 is amended by striking the item relating to section 174 and inserting the following new item: Sec. 174. Amortization of research and experimental expenditures. . (c) Effective date The amendments made by this section shall apply to amounts paid or incurred in taxable years beginning after December 31, 2022. 3316. Uniform treatment of expenses in contingency fee cases (a) In general Section 162 , as amended by the preceding provisions of this Act, is amended by redesignating subsection (r) as subsection (s) and by inserting after subsection (q) the following new subsection: (r) Expenses in contingency fee cases No deduction shall be allowed under subsection (a) to a taxpayer for any expense— (1) paid or incurred in the course of the trade or business of practicing law, and (2) resulting from a case for which the taxpayer is compensated primarily on a contingent basis,