Ported publish to command structure.