Refactor #filter_source methods