Added timing mechanism: search now only takes places when text has changed.
Fixed mistake regarding event arguments.