Move to switch statement instead of a dozen ifs for validation.