Made a unified way to execute commands.