Exec code clean up

ref comments in #15637