Remove some parts of match_fn.