Added ThreadPoolExecutor. Fixes to Executor when to assure that loop runs