Added code for commands.