Redo the functions handling all commands
Can now do multiple commands