Externalizing path filter utility code to external module