Refactor contactfilter