Updated to control threads via ExecutorService