WIP: factor out QUASIEXPAND