Added search length limit, and trimmed query whitespace.