Improved readability in search.ts