Move a large set of if statements to a table.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>