Retirement tax questions

This was very helpful. My 1099-R incorrectly had a T code and therefore is was treated as taxable on our MA return.  I changed it to Q to correctly characterize the status of our Roth distribution and that fixed the problem.