Refactor module filter.