Enable SSL by default.  Small improvements to unit tests.  Various tidying.