; and (2) by striking section 8332 in subsection (n) and inserting sections 8332 and 8411 . 304. Limit on teaching compensation of retired judges (a) In general Section 7447 of the Internal Revenue Code of 1986 is amended by adding at the end the following new subsection: (k) Teaching compensation of retired judges For purposes of the limitation under section 501(a) of the Ethics in Government Act of 1978 (5 U.S.C. App.), any compensation for teaching approved under section 502(a)(5) of such Act shall not be treated as outside earned income when received by a judge of the United States Tax Court who has retired under subsection (b) for teaching performed during any calendar year for which such a judge has met the requirements of subsection (c), as certified by the chief judge. . (b) Effective date The amendment made by this section shall apply to any individual serving as a retired judge of the United States Tax Court on or after the date of the enactment of this Act. 305. General provisions relating to magistrate judges of the Tax Court (a) Title of special trial judge changed to magistrate judge of the Tax Court The heading of section 7443A of the Internal Revenue Code of 1986 is amended by striking “ Special trial judges ” and inserting Magistrate judges of the Tax Court . (b) Appointment, tenure, and removal Subsection (a) of section 7443A of the Internal Revenue Code of 1986 is amended to read as follows: (a) Appointment, tenure, and removal (1) Appointment The chief judge may, from time to time, appoint and reappoint magistrate judges of the Tax Court for a term of 8 years. The magistrate judges of the Tax Court shall proceed under such rules as may be promulgated by the Tax Court. (2) Removal (A) In general Except as provided in subparagraph (B), removal of a magistrate judge of the Tax Court during the term for which such magistrate judge is appointed shall be only for incompetency, misconduct, neglect of duty, or physical or mental disability. Removal shall not occur unless a majority of all the judges