Merge against master

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