Helper functions GetCommandCode and GetCommandName
Helper to get the command name