Added JS searchNames function and tests