Added SSL

Soon to move everything to a new module 'connection' but I wanted to
push this before I pull everything apart.
Minor output format change