small clean up of input arguments in replaceecode