Changed so that the typedef type_mask is used for all bitwise type masks.