Cleanup and addition of SSL configuration handling