Clean up argument parsing and add options for SSL.