Multi-key TLS and a couple of fixes/improvements

cc @trevnorris 
Thanks for catching this!