Restructure search code to split on spaces and search separately.