Refine types