changed CommandRegistry.getCommand to return CommandDefinition