Search engine debug

added more comments.