Added search button(with functionality)
refactored scripts for search