This removes some switch/case clutter at a slight potential cost for the additional indirection.
Attach a file by drag & drop or click to upload