Refactored the components to be able to filter by paths