Get rid of dumb switch-cases.