Merged against master

I merged against master (should be better than rebasing in this case), but there are a few issues with TLS tests. 

This is currently a work in progress.