Thank you, it's working!
Well, it's not perfect yet, because I can't download anything from Amazon's cloud (it's stuck as pending) but I've successfully loaded some books from my calibre library. I'll report back when I take a better look at this issue.
I've sent you a pull request on Github with a tiny patch I had to apply in order to make KSP work with my Kindle. It 's my first time using Git, sorry if I've mixed something up.