search.js cleanup