single quotes to double
Fix for when empty search is initiated and gets stuck
Reordered functions so that functions are defined before they are called
Moved query null check to _getQueryRegExp