Move common code up to mix; introduce thinner "type system"