cleanup pseudo stacks, moved geom gen to primitive util, cosmetics