Refactored Command.sideEffectResult and Command.executeCollect