category typing improvements