Gh188

Fix for #188 and general asio/SSL code restructuring.