Added a command executor for add commands.
code clean up