fixes to search algorithm
minor bug fixes
bug fixes to query event processing
added bounds checks for search query param
removed levenshtein-automata dependency
break out functions into their own modules