union_t cleanup and a bunch of new stuff