nit
add simple toplevel completion function
move displaycompletion event masking code further up in the method
move old (slow) toplevel completion function to a separate unused function