Extracted the commands to ExecudeCommand method