Make textSearcher.js reusable