Clean up ssl template moving many `if` to attributes