Refactor xexecscript.d