Why was Batsheva permitted to Dovid?

The Gemara on Kessuvos 9a-9b (daf yomi for Friday) discusses the relationship between Dovid HaMelech and Batsheva. The Gemara asks that she should have been prohibited to him, but answers that Uriah had given her a Get. What type of Get was it, and how did it make her permitted to him?

Was Batsheva married to Uriah at the time that Dovid took her? If so, how was she permitted to him? If Uriah had already given her a get, there should have been no problem, so why did Dovid do Teshuva for this?

To understand these and other points, see our Iyun Insights on דף ט.

To go deeper, see our short video shiur entitled, Why Was Batsheva Permitted to Dovid?

Both are available on our Kessubos page for דף ט.