Remove dead code dealing with type refinement