Multiple State Filing

My situation is slightly unique when it comes to state tax returns.

 

I am married filing jointly with my spouse. I worked in NY and lived in NJ from Jan to August 2019. We then moved to MD in Aug 2019 and we both began work in DC. She was withheld with DC taxes, whereas I had a reciprocity waiver and got withheld NJ taxes since my permanent home is in NJ. My driver's license and voter registration is also in NJ along with co-owning a property in NJ. We leased an apartment in MD around end of August.

 

My question is I know we need to file NJ, NY, and DC (for my spouse only) return. Do I need to file MD state tax return as well. The law states that I need to live in MD for 183 days or more to be considered a resident, which I didn't. For part-year and nonresident returns, I need to work in MD, but I worked in DC instead. I've heard some people tell me to do a part-year MD return and some tell me just do a full year NJ return. I was withheld NJ taxes while working in DC so I did pay state income taxes. Please let me know what to do and how to file on Turbo Tax online. I am getting super weird refund results right now.