Extract coommand executor as a class