JS & PHP search mostly done

JS and PHP search functions have been updated.