Refactor e-command argument code