Storing command type in mapping file.
Mapping now uses command type to discriminate between commands.