Cleanup command processing

move Command map to local variable, added deletion of command classes,
move Command interface to its own header