Refactored the way files are sourced and filtered.