More idiomatic `switch` usage.