divide search.js into serveral files