Refactored toward using a command in the type as well

Signed-off-by: Bert Hajee <hajee@moretIA.com>