Replace elseifs with switches

Ben told me how to do this, so this might have errors.