Refactor link filtering based on previous comments