FIX: undefined variable nul.
FIX: reset everything when window looses focus (hide the window as well).
Comment and refactor the code to create the compiled terms for the search entries.