database and search js updates from Roman