Switch to std::optional specialization instead of OptionalFoo types, tidy up CardDefs