Refactor CoinsCommand.