Moving search functions to separate script file.