Refine some types