Can we break the common stuff from the two switch cases out of the switch, so it's not redundant?