Get rid of type-shunning using unions