Added ToCommand() and CreateCommand() extensions.