move SSL init
cleanup