Replace isShowSummaryForm() with isCommand() and misc fixes.