Added commandexecutor class and moved control watch to main thread