Update search js code to latest from Steve