Collapse identical switch cases.

Relates to #39.