Moved setExecutor to its own class.