Added mainsearch Function documentation