Moving the searching javascript into the new module