Creating object pool for scripts, and canceling searches when a script should halt