Corrected mapping logic of commands, command factories, and output of
commands to be based on a source reference model and a target reference
model.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>