From 5eb40c9e7bda85d20d3c2e2dd1d843de337e3a8b Mon Sep 17 00:00:00 2001 From: John Kerl Date: Mon, 16 Feb 2026 15:49:21 -0500 Subject: [PATCH] Multiple style updates (#1974) * Comment style * IRecordTransformer -> RecordTransfomer * make fmt * else-return style mod * snake-case -> camel-case * Remove redundant err = nil and similar zero-value initializations. * redundant break; * bugfix * neaten * typofix * simplify/standardize init of zero-length slices * Standardize fmt.Fprintf w/ errors * fix double print of "mlr:" * neatening * Uniformize error messages * make docs * avoid shadowing package names * shorten some receiver names --- cmd/experiments/dsl_parser/two/main.go | 14 +- cmd/scan/main.go | 2 - cmd/sizes/main.go | 2 - docs/src/file-formats.md | 2 +- docs/src/miller-as-library/main3.go | 2 +- docs/src/record-heterogeneity.md | 4 +- docs/src/reference-dsl-differences.md | 2 +- docs/src/reference-dsl-errors.md | 2 +- .../reference-dsl-higher-order-functions.md | 2 +- pkg/auxents/auxents.go | 2 - pkg/auxents/hex.go | 7 +- pkg/auxents/lecat.go | 2 +- pkg/auxents/termcvt.go | 10 +- pkg/auxents/unhex.go | 6 +- pkg/bifs/arithmetic.go | 45 +-- pkg/bifs/base.go | 14 +- pkg/bifs/bits.go | 8 - pkg/bifs/booleans.go | 14 +- pkg/bifs/cmp.go | 2 - pkg/bifs/collections.go | 77 ++--- pkg/bifs/datetime.go | 15 +- pkg/bifs/hashing.go | 52 ++-- pkg/bifs/mathlib.go | 7 +- pkg/bifs/percentiles.go | 19 +- pkg/bifs/regex.go | 11 +- pkg/bifs/stats.go | 154 +++++----- pkg/bifs/strings.go | 74 ++--- pkg/bifs/system.go | 3 +- pkg/bifs/types.go | 88 +++--- pkg/cli/flag_types.go | 9 - pkg/cli/flatten_unflatten.go | 3 - pkg/cli/mlrcli_util.go | 6 +- pkg/cli/option_parse.go | 22 +- pkg/cli/option_types.go | 6 +- pkg/cli/verb_utils.go | 2 - pkg/climain/mlrcli_mlrrc.go | 2 +- pkg/climain/mlrcli_parse.go | 15 +- pkg/climain/mlrcli_shebang.go | 6 +- pkg/colorizer/colorizer.go | 32 +- pkg/dsl/ast_build.go | 5 +- pkg/dsl/ast_print.go | 13 - pkg/dsl/ast_types.go | 2 - pkg/dsl/cst/assignments.go | 2 - pkg/dsl/cst/block_exit.go | 5 +- pkg/dsl/cst/blocks.go | 8 +- pkg/dsl/cst/builtin_function_manager.go | 149 +++++----- pkg/dsl/cst/builtin_functions.go | 62 ++-- pkg/dsl/cst/collections.go | 58 ++-- pkg/dsl/cst/cond.go | 5 +- pkg/dsl/cst/dump.go | 9 +- pkg/dsl/cst/emit1.go | 2 - pkg/dsl/cst/emit_emitp.go | 126 ++++---- pkg/dsl/cst/emitf.go | 13 +- pkg/dsl/cst/env.go | 2 - pkg/dsl/cst/evaluable.go | 4 +- pkg/dsl/cst/filter.go | 4 - pkg/dsl/cst/for.go | 28 +- pkg/dsl/cst/functions.go | 8 +- pkg/dsl/cst/hofs.go | 52 +--- pkg/dsl/cst/if.go | 8 +- pkg/dsl/cst/keyword_usage.go | 2 - pkg/dsl/cst/leaves.go | 16 +- pkg/dsl/cst/lvalues.go | 75 ++--- pkg/dsl/cst/print.go | 10 +- pkg/dsl/cst/root.go | 41 +-- pkg/dsl/cst/signature.go | 2 - pkg/dsl/cst/statements.go | 12 +- pkg/dsl/cst/subroutines.go | 8 +- pkg/dsl/cst/tee.go | 12 +- pkg/dsl/cst/types.go | 11 - pkg/dsl/cst/udf.go | 42 +-- pkg/dsl/cst/uds.go | 19 +- pkg/dsl/cst/validate.go | 40 ++- pkg/dsl/cst/warn.go | 5 - pkg/dsl/cst/while.go | 6 +- pkg/dsl/token.go | 3 +- pkg/entrypoint/entrypoint.go | 10 +- pkg/go-csv/csv_reader.go | 2 - pkg/input/pseudo_reader_gen.go | 2 +- pkg/input/record_reader_csv.go | 5 +- pkg/input/record_reader_csvlite.go | 8 +- pkg/input/record_reader_dkvp_nidx.go | 2 +- pkg/input/record_reader_json.go | 1 - pkg/input/record_reader_pprint.go | 41 ++- pkg/input/record_reader_tsv.go | 8 +- pkg/input/record_reader_xtab.go | 14 +- pkg/input/splitters.go | 6 +- pkg/lib/file_readers.go | 30 +- pkg/lib/getoptify.go | 2 +- pkg/lib/halfpipe.go | 2 +- pkg/lib/latin1_test.go | 2 - pkg/lib/mlrmath.go | 8 +- pkg/lib/ordered_map.go | 22 +- pkg/lib/paragraph.go | 2 +- pkg/lib/rand.go | 9 +- pkg/lib/readfiles.go | 15 +- pkg/lib/regex.go | 12 +- pkg/lib/regex_test.go | 2 - pkg/lib/stats.go | 40 +-- pkg/lib/time.go | 12 +- pkg/lib/time_test.go | 2 - pkg/lib/unbackslash.go | 2 - pkg/lib/unbackslash_test.go | 2 - pkg/lib/util.go | 55 ++-- pkg/mlrval/mlrmap.go | 11 +- pkg/mlrval/mlrmap_accessors.go | 108 +++---- pkg/mlrval/mlrmap_flatten_unflatten.go | 10 +- pkg/mlrval/mlrmap_json.go | 9 +- pkg/mlrval/mlrmap_print.go | 4 +- pkg/mlrval/mlrval_accessors.go | 4 +- pkg/mlrval/mlrval_cmp.go | 5 - pkg/mlrval/mlrval_cmp_test.go | 2 - pkg/mlrval/mlrval_collections.go | 207 ++++++------- pkg/mlrval/mlrval_constants.go | 4 +- pkg/mlrval/mlrval_format.go | 58 ++-- pkg/mlrval/mlrval_get.go | 39 +-- pkg/mlrval/mlrval_get_test.go | 2 - pkg/mlrval/mlrval_infer.go | 37 +-- pkg/mlrval/mlrval_infer_test.go | 2 - pkg/mlrval/mlrval_is.go | 3 +- pkg/mlrval/mlrval_is_test.go | 2 - pkg/mlrval/mlrval_json.go | 31 +- pkg/mlrval/mlrval_new.go | 27 +- pkg/mlrval/mlrval_new_test.go | 2 - pkg/mlrval/mlrval_output.go | 10 +- pkg/mlrval/mlrval_sort.go | 12 +- pkg/mlrval/mlrval_sort_test.go | 1 - pkg/mlrval/mlrval_type.go | 5 +- pkg/mlrval/mlrval_yaml.go | 2 - pkg/mlrval/mlrval_yaml_test.go | 2 - pkg/output/channel_writer.go | 3 +- pkg/output/file_output_handlers.go | 50 ++-- pkg/output/record_writer_csv_colorizer.go | 3 - pkg/output/record_writer_json_jsonl.go | 4 +- pkg/output/record_writer_pprint.go | 34 +-- pkg/output/record_writer_xtab.go | 1 - pkg/output/record_writer_yaml.go | 10 +- pkg/pbnjay-strptime/strptime.go | 65 ++-- pkg/platform/diff_notwindows.go | 2 - pkg/platform/diff_windows.go | 2 - pkg/platform/getargs_notwindows.go | 2 - pkg/platform/getargs_windows.go | 6 +- pkg/platform/shellrun_notwindows.go | 2 - pkg/platform/shellrun_windows.go | 13 +- pkg/runtime/stack.go | 31 +- pkg/runtime/state.go | 2 - pkg/scan/digits.go | 12 +- pkg/scan/find.go | 15 +- pkg/stream/stream.go | 2 +- pkg/terminals/help/entry.go | 11 +- pkg/terminals/regtest/entry.go | 2 - pkg/terminals/regtest/regtester.go | 189 ++++++------ pkg/terminals/repl/dsl.go | 2 - pkg/terminals/repl/entry.go | 8 +- pkg/terminals/repl/prompt.go | 5 +- pkg/terminals/repl/session.go | 11 +- pkg/terminals/repl/types.go | 2 - pkg/terminals/repl/verbs.go | 50 ++-- pkg/terminals/terminals.go | 2 - pkg/transformers/aaa_chain_transformer.go | 13 +- pkg/transformers/aaa_record_transformer.go | 8 +- pkg/transformers/altkv.go | 10 +- pkg/transformers/bar.go | 7 +- pkg/transformers/bootstrap.go | 7 +- pkg/transformers/case.go | 4 +- pkg/transformers/cat.go | 5 +- pkg/transformers/check.go | 9 +- pkg/transformers/clean_whitespace.go | 4 +- pkg/transformers/count.go | 5 +- pkg/transformers/count_similar.go | 7 +- pkg/transformers/cut.go | 8 +- pkg/transformers/decimate.go | 5 +- pkg/transformers/fill_down.go | 5 +- pkg/transformers/fill_empty.go | 5 +- pkg/transformers/flatten.go | 5 +- pkg/transformers/format_values.go | 5 +- pkg/transformers/fraction.go | 7 +- pkg/transformers/gap.go | 5 +- pkg/transformers/grep.go | 5 +- pkg/transformers/group_by.go | 12 +- pkg/transformers/group_like.go | 12 +- pkg/transformers/having_fields.go | 5 +- pkg/transformers/head.go | 5 +- pkg/transformers/histogram.go | 5 +- pkg/transformers/join.go | 14 +- pkg/transformers/json_parse.go | 5 +- pkg/transformers/json_stringify.go | 5 +- pkg/transformers/label.go | 12 +- pkg/transformers/latin1_to_utf8.go | 10 +- pkg/transformers/merge_fields.go | 11 +- pkg/transformers/most_or_least_frequent.go | 9 +- pkg/transformers/nest.go | 7 +- pkg/transformers/nothing.go | 9 +- pkg/transformers/put_or_filter.go | 16 +- pkg/transformers/regularize.go | 10 +- pkg/transformers/remove_empty_columns.go | 13 +- pkg/transformers/rename.go | 7 +- pkg/transformers/reorder.go | 4 +- pkg/transformers/repeat.go | 5 +- pkg/transformers/reshape.go | 8 +- pkg/transformers/sample.go | 6 +- pkg/transformers/sec2gmt.go | 5 +- pkg/transformers/sec2gmtdate.go | 10 +- pkg/transformers/seqgen.go | 4 +- pkg/transformers/shuffle.go | 12 +- pkg/transformers/skip_trivial_records.go | 10 +- pkg/transformers/sort.go | 15 +- pkg/transformers/sort_within_records.go | 4 +- pkg/transformers/sparsify.go | 4 +- pkg/transformers/split.go | 2 +- pkg/transformers/stats1.go | 12 +- pkg/transformers/stats2.go | 11 +- pkg/transformers/step.go | 12 +- pkg/transformers/subs.go | 29 +- pkg/transformers/summary.go | 9 +- pkg/transformers/surv.go | 8 +- pkg/transformers/tac.go | 11 +- pkg/transformers/tail.go | 7 +- pkg/transformers/tee.go | 8 +- pkg/transformers/template.go | 5 +- pkg/transformers/top.go | 2 +- pkg/transformers/unflatten.go | 5 +- pkg/transformers/uniq.go | 13 +- pkg/transformers/unspace.go | 4 +- pkg/transformers/unsparsify.go | 7 +- pkg/transformers/utf8_to_latin1.go | 10 +- pkg/transformers/utils/join_bucket.go | 4 +- pkg/transformers/utils/join_bucket_keeper.go | 55 ++-- pkg/transformers/utils/percentile_keeper.go | 28 +- pkg/transformers/utils/stats1_accumulators.go | 30 +- pkg/transformers/utils/stats2_accumulators.go | 18 +- pkg/transformers/utils/top_keeper.go | 3 - pkg/transformers/utils/window_keeper.go | 7 +- pkg/types/mlrval_typing.go | 13 +- scripts/early-multi-language-timings/catgo.go | 7 +- .../early-multi-language-timings/catgo2.go | 4 +- scripts/early-multi-language-timings/cutgo.go | 281 +++++++++--------- .../mand/mandg.go | 6 +- test/cases/dsl-argpass-typedecl/0002/experr | 2 +- test/cases/dsl-argpass-typedecl/0003/experr | 2 +- test/cases/dsl-argpass-typedecl/0004/experr | 2 +- test/cases/dsl-argpass-typedecl/0005/experr | 2 +- .../dsl-lashed-emitp-singles/0013/experr | 2 +- .../dsl-lashed-emitp-singles/0014/experr | 2 +- .../dsl-lashed-emitp-singles/0024/experr | 2 +- .../dsl-lashed-emitp-singles/0026/experr | 2 +- .../dsl-lashed-emitp-singles/0027/experr | 2 +- .../dsl-lashed-emitp-singles/0029/experr | 2 +- .../dsl-lashed-emitp-singles/0031/experr | 2 +- .../dsl-lashed-emitp-singles/0032/experr | 2 +- .../dsl-lashed-emitp-singles/0033/experr | 2 +- .../dsl-lashed-emitp-singles/0037/experr | 2 +- .../dsl-lashed-emitp-singles/0038/experr | 2 +- .../dsl-lashed-emitp-singles/0039/experr | 2 +- .../dsl-lashed-emitp-singles/0040/experr | 2 +- .../dsl-lashed-emitp-singles/0041/experr | 2 +- .../dsl-lashed-emitp-singles/0045/experr | 2 +- .../dsl-lashed-emitp-singles/0046/experr | 2 +- .../dsl-lashed-emitp-singles/0047/experr | 2 +- .../dsl-lashed-emitp-singles/0048/experr | 2 +- .../dsl-lashed-emitp-singles/0057/experr | 2 +- .../dsl-lashed-emitp-singles/0060/experr | 2 +- .../dsl-lashed-emitp-singles/0062/experr | 2 +- .../dsl-lashed-emitp-singles/0063/experr | 2 +- .../dsl-lashed-emitp-singles/0068/experr | 2 +- .../dsl-lashed-emitp-singles/0074/experr | 2 +- .../dsl-lashed-emitp-singles/0080/experr | 2 +- .../dsl-lashed-emitp-singles/0086/experr | 2 +- .../dsl-lashed-emitp-singles/0092/experr | 2 +- test/cases/dsl-mapvar-assignments/0003/experr | 2 +- test/cases/dsl-mapvar-assignments/0009/experr | 2 +- test/cases/dsl-mapvar-assignments/0012/experr | 2 +- test/cases/dsl-mapvar-assignments/0018/experr | 2 +- test/cases/dsl-mapvar-assignments/0024/experr | 2 +- test/cases/dsl-mapvar-assignments/0027/experr | 2 +- .../dsl-mapvars-udfs-subroutines/0006/experr | 2 +- .../dsl-mapvars-udfs-subroutines/0008/experr | 2 +- .../dsl-mapvars-udfs-subroutines/0010/experr | 2 +- .../dsl-mapvars-udfs-subroutines/0011/experr | 2 +- test/cases/dsl-parameterized-emit/0048/experr | 2 +- test/cases/dsl-parameterized-emit/0056/experr | 2 +- test/cases/dsl-parse/0113/experr | 2 +- test/cases/dsl-parse/0114/experr | 2 +- test/cases/dsl-subr/0002/experr | 2 +- test/cases/dsl-subr/0008/experr | 2 +- test/cases/dsl-trailing-commas/0003/experr | 2 +- test/cases/dsl-trailing-commas/0005/experr | 2 +- test/cases/dsl-trailing-commas/0007/experr | 2 +- test/cases/dsl-trailing-commas/0009/experr | 2 +- test/cases/dsl-trailing-commas/0011/experr | 2 +- test/cases/dsl-trailing-commas/0013/experr | 2 +- test/cases/dsl-trailing-commas/0016/experr | 2 +- test/cases/dsl-trailing-commas/0017/experr | 2 +- test/cases/dsl-typedecl/0009/experr | 2 +- test/cases/dsl-typedecl/0010/experr | 2 +- test/cases/dsl-typedecl/0014/experr | 2 +- test/cases/dsl-typedecl/0015/experr | 2 +- .../io-csv-auto-unsparsify/key-change/experr | 2 +- test/cases/io-multi/0010/experr | 2 +- test/cases/io-multi/0033/experr | 2 +- test/cases/io-multi/0034/experr | 2 +- .../io-skip-pass-comments/pr-1346/experr | 2 +- .../io-skip-pass-comments/pr-1787-a/experr | 2 +- .../io-skip-pass-comments/pr-1787-d/experr | 2 +- test/cases/io-spec-tsv/0004/experr | 2 +- .../io-tsv-auto-unsparsify/key-change/experr | 2 +- test/cases/verb-label/0009/experr | 2 +- 307 files changed, 1649 insertions(+), 2555 deletions(-) diff --git a/cmd/experiments/dsl_parser/two/main.go b/cmd/experiments/dsl_parser/two/main.go index fb695d1d9..86524b505 100644 --- a/cmd/experiments/dsl_parser/two/main.go +++ b/cmd/experiments/dsl_parser/two/main.go @@ -23,14 +23,13 @@ func parseOne(input string, printError bool) bool { iast.(*dsl.AST).Print() fmt.Println() return true - } else { - if printError { - fmt.Println(err) - } - fmt.Printf("%sFail%s %s\n", RED, TEXTDEFAULT, input) - fmt.Println() - return false } + if printError { + fmt.Println(err) + } + fmt.Printf("%sFail%s %s\n", RED, TEXTDEFAULT, input) + fmt.Println() + return false } func main() { @@ -121,3 +120,4 @@ func main() { } } } + diff --git a/cmd/scan/main.go b/cmd/scan/main.go index d42b08115..802b6b5e6 100644 --- a/cmd/scan/main.go +++ b/cmd/scan/main.go @@ -1,6 +1,4 @@ -// ================================================================ // Experiments for type-inference performance optimization -// ================================================================ package main diff --git a/cmd/sizes/main.go b/cmd/sizes/main.go index 8e06398fe..8478b601a 100644 --- a/cmd/sizes/main.go +++ b/cmd/sizes/main.go @@ -1,6 +1,4 @@ -// ================================================================ // Experiments for type-inference performance optimization -// ================================================================ /* go build github.com/johnkerl/miller/v6/cmd/sizes diff --git a/docs/src/file-formats.md b/docs/src/file-formats.md index 519704f8f..d852e7f93 100644 --- a/docs/src/file-formats.md +++ b/docs/src/file-formats.md @@ -222,7 +222,7 @@ a,b,c 1,2,3 4,5,6 mlr: CSV schema change: first keys "a,b,c"; current keys "a,X,c" -mlr: exiting due to data error. +mlr: exiting due to data error * In short, use-cases for CSV-lite and TSV-lite are often found when dealing with CSV/TSV files which are formatted in some non-standard way -- you have a little more flexibility available to you. (As an example of this flexibility: ASV and USV are nothing more than CSV-lite with different values for FS and RS.) diff --git a/docs/src/miller-as-library/main3.go b/docs/src/miller-as-library/main3.go index 617488c33..b7961e57c 100644 --- a/docs/src/miller-as-library/main3.go +++ b/docs/src/miller-as-library/main3.go @@ -57,7 +57,7 @@ func convert_csv_to_json(fileNames []string) error { if err != nil { return err } - recordTransformers := []transformers.IRecordTransformer{cat} + recordTransformers := []transformers.RecordTransformer{cat} // Set up the reader-to-transformer and transformer-to-writer channels. readerChannel := make(chan *list.List, 2) // list of *types.RecordAndContext diff --git a/docs/src/record-heterogeneity.md b/docs/src/record-heterogeneity.md index 1eb7eb0b5..fe4126121 100644 --- a/docs/src/record-heterogeneity.md +++ b/docs/src/record-heterogeneity.md @@ -128,7 +128,7 @@ If you `mlr --csv cat` this, you'll get an error message:
 a,b,c
 1,2,3
-mlr: mlr: CSV header/data length mismatch 3 != 2 at filename data/het/ragged.csv row 3.
+mlr: CSV header/data length mismatch 3 != 2 at filename data/het/ragged.csv row 3
 
There are two kinds of raggedness here. Since CSVs form records by zipping the keys from the header line, together with the values from each data line, the second record has a missing value for key `c` (which ought to be fillable), while the third record has a value `10` with no key for it. @@ -459,7 +459,7 @@ resource,loadsec,ok /path/to/second/file,0.32,true /some/other/path,0.97,false mlr: CSV schema change: first keys "resource,loadsec,ok"; current keys "record_count,resource" -mlr: exiting due to data error. +mlr: exiting due to data error Miller handles explicit header changes as shown. If your CSV input contains ragged data -- if there are implicit header changes (no intervening blank line and new header line) as seen above -- you can use `--allow-ragged-csv-input` (or keystroke-saver `--ragged`). diff --git a/docs/src/reference-dsl-differences.md b/docs/src/reference-dsl-differences.md index d85897367..23e0ee17d 100644 --- a/docs/src/reference-dsl-differences.md +++ b/docs/src/reference-dsl-differences.md @@ -64,7 +64,7 @@ error.
 mlr: cannot parse DSL expression.
-Parse error on token "$y" at line 6 column 3.
+mlr: Parse error on token "$y" at line 6 column 3.
 Please check for missing semicolon.
 Expected one of:
   ␚ ; > >> | ? || ^^ && =~ !=~ == != <=> >= < <= ^ & << >>> + - .+ .- *
diff --git a/docs/src/reference-dsl-errors.md b/docs/src/reference-dsl-errors.md
index fa9a74636..b4d620faa 100644
--- a/docs/src/reference-dsl-errors.md
+++ b/docs/src/reference-dsl-errors.md
@@ -56,7 +56,7 @@ x,y
 3,0.4771212547196624
 mlr: data error at NR=4 FNR=4 FILENAME=data-error.csv
 mlr: field y: log10: unacceptable type string with value "text"
-mlr: exiting due to data error.
+mlr: exiting due to data error
 
The second is to put `-x` into your [`~/.mlrrc` file](customization.md). diff --git a/docs/src/reference-dsl-higher-order-functions.md b/docs/src/reference-dsl-higher-order-functions.md index 6e41bd281..628ea0b78 100644 --- a/docs/src/reference-dsl-higher-order-functions.md +++ b/docs/src/reference-dsl-higher-order-functions.md @@ -776,7 +776,7 @@ As of September 2021, immediately invoked function expressions (IIFEs) are not p
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 4 column 35.
+mlr: Parse error on token "(" at line 4 column 35.
 Please check for missing semicolon.
 Expected one of:
   ; } > >> | ? || ^^ && =~ !=~ == != <=> >= < <= ^ & << >>> + - .+ .- * /
diff --git a/pkg/auxents/auxents.go b/pkg/auxents/auxents.go
index ec4e1299a..12c7545c5 100644
--- a/pkg/auxents/auxents.go
+++ b/pkg/auxents/auxents.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Support for Miller regression testing. Originally bash scripts; ported to Go
 // for ease of Windows-native testing.
-// ================================================================
 
 package auxents
 
diff --git a/pkg/auxents/hex.go b/pkg/auxents/hex.go
index 742ef44aa..49902edc9 100644
--- a/pkg/auxents/hex.go
+++ b/pkg/auxents/hex.go
@@ -6,9 +6,7 @@ import (
 	"os"
 )
 
-// ================================================================
 // Copyright (c) 1998 John Kerl.
-// ================================================================
 // This is a simple hex dump with hex offsets to the left, hex data in the
 // middle, and ASCII at the right.  This is a subset of the functionality of
 // Unix od; I wrote it in my NT days.
@@ -24,7 +22,6 @@ import (
 // 00000050: 50 51 52 53  54 55 56 57  58 59 5a 5b  5c 5d 5e 5f |PQRSTUVWXYZ[\]^_|
 // 00000060: 60 61 62 63  64 65 66 67  68 69 6a 6b  6c 6d 6e 6f |`abcdefghijklmno|
 // 00000070: 70 71 72 73  74 75 76 77  78 79 7a 7b  7c 7d 7e 7f |pqrstuvwxyz{|}~.|
-// ================================================================
 
 func hexUsage(verbName string, o *os.File, exitCode int) {
 	fmt.Fprintf(o, "Usage: mlr %s [options] {zero or more file names}\n", verbName)
@@ -64,7 +61,7 @@ func hexMain(args []string) int {
 			istream, err := os.Open(filename)
 			if err != nil {
 				// TODO: "mlr"
-				fmt.Fprintln(os.Stderr, "mlr hex:", err)
+				fmt.Fprintf(os.Stderr, "mlr hex: %v\n", err)
 				os.Exit(1)
 			}
 
@@ -101,7 +98,7 @@ func hexDumpFile(istream *os.File, doRaw bool) {
 		// exact multiple of our buffer size. We'll break the loop after
 		// hex-dumping this last, partial fragment.
 		if err != nil && err != io.ErrUnexpectedEOF {
-			fmt.Fprintln(os.Stderr, "mlr hex:", err)
+			fmt.Fprintf(os.Stderr, "mlr hex: %v\n", err)
 			os.Exit(1)
 		}
 
diff --git a/pkg/auxents/lecat.go b/pkg/auxents/lecat.go
index d8c605bcf..d6abf87b6 100644
--- a/pkg/auxents/lecat.go
+++ b/pkg/auxents/lecat.go
@@ -48,7 +48,7 @@ func lecatMain(args []string) int {
 
 			istream, err := os.Open(filename)
 			if err != nil {
-				fmt.Fprintln(os.Stderr, "mlr lecat:", err)
+				fmt.Fprintf(os.Stderr, "mlr lecat: %v\n", err)
 				os.Exit(1)
 			}
 
diff --git a/pkg/auxents/termcvt.go b/pkg/auxents/termcvt.go
index 4e27ec405..eafefae6e 100644
--- a/pkg/auxents/termcvt.go
+++ b/pkg/auxents/termcvt.go
@@ -82,14 +82,14 @@ func termcvtMain(args []string) int {
 			istream, err := os.Open(filename)
 			if err != nil {
 				// TODO: "mlr"
-				fmt.Fprintln(os.Stderr, "mlr termcvt:", err)
+				fmt.Fprintf(os.Stderr, "mlr termcvt: %v\n", err)
 				os.Exit(1)
 			}
 
 			ostream, err := os.Open(tempname)
 			if err != nil {
 				// TODO: "mlr"
-				fmt.Fprintln(os.Stderr, "mlr termcvt:", err)
+				fmt.Fprintf(os.Stderr, "mlr termcvt: %v\n", err)
 				os.Exit(1)
 			}
 
@@ -102,7 +102,7 @@ func termcvtMain(args []string) int {
 			err = os.Rename(tempname, filename)
 			if err != nil {
 				// TODO: "mlr"
-				fmt.Fprintln(os.Stderr, "mlr termcvt:", err)
+				fmt.Fprintf(os.Stderr, "mlr termcvt: %v\n", err)
 				os.Exit(1)
 			}
 		}
@@ -113,7 +113,7 @@ func termcvtMain(args []string) int {
 			istream, err := os.Open(filename)
 			if err != nil {
 				// TODO: "mlr"
-				fmt.Fprintln(os.Stderr, "mlr termcvt:", err)
+				fmt.Fprintf(os.Stderr, "mlr termcvt: %v\n", err)
 				os.Exit(1)
 			}
 
@@ -137,7 +137,7 @@ func termcvtFile(istream *os.File, ostream *os.File, inputTerminator string, out
 
 		if err != nil {
 			// TODO: "mlr"
-			fmt.Fprintln(os.Stderr, "mlr termcvt:", err)
+			fmt.Fprintf(os.Stderr, "mlr termcvt: %v\n", err)
 			os.Exit(1)
 		}
 
diff --git a/pkg/auxents/unhex.go b/pkg/auxents/unhex.go
index 63693ac03..e12e3af55 100644
--- a/pkg/auxents/unhex.go
+++ b/pkg/auxents/unhex.go
@@ -35,7 +35,7 @@ func unhexMain(args []string) int {
 		for _, filename := range args {
 			istream, err := os.Open(filename)
 			if err != nil {
-				fmt.Fprintln(os.Stderr, "mlr unhex:", err)
+				fmt.Fprintf(os.Stderr, "mlr unhex: %v\n", err)
 				os.Exit(1)
 			}
 			unhexFile(istream, os.Stdout)
@@ -62,7 +62,7 @@ func unhexFile(istream *os.File, ostream *os.File) {
 			break
 		}
 		if err != nil {
-			fmt.Fprintln(os.Stderr, "mlr unhex:", err)
+			fmt.Fprintf(os.Stderr, "mlr unhex: %v\n", err)
 			os.Exit(1)
 		}
 
@@ -75,7 +75,7 @@ func unhexFile(istream *os.File, ostream *os.File) {
 			if field != "" {
 				n, err := fmt.Sscanf(field, "%x", &scanValue)
 				if err != nil {
-					fmt.Fprintln(os.Stderr, "mlr unhex:", err)
+					fmt.Fprintf(os.Stderr, "mlr unhex: %v\n", err)
 					os.Exit(1)
 				}
 				if n != 1 {
diff --git a/pkg/bifs/arithmetic.go b/pkg/bifs/arithmetic.go
index 02f2aa24d..fc8309775 100644
--- a/pkg/bifs/arithmetic.go
+++ b/pkg/bifs/arithmetic.go
@@ -8,7 +8,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/mlrval"
 )
 
-// ================================================================
 // Unary plus operator
 
 func upos_te(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -33,7 +32,6 @@ func BIF_plus_unary(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return upos_dispositions[input1.Type()](input1)
 }
 
-// ================================================================
 // Unary minus operator
 
 func uneg_te(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -66,7 +64,6 @@ func BIF_minus_unary(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return uneg_dispositions[input1.Type()](input1)
 }
 
-// ================================================================
 // Addition with auto-overflow from int to float when necessary.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -90,9 +87,8 @@ func plus_n_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 
 	if overflowed {
 		return mlrval.FromFloat(float64(a) + float64(b))
-	} else {
-		return mlrval.FromInt(c)
 	}
+	return mlrval.FromInt(c)
 }
 
 func plus_f_if(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -128,7 +124,6 @@ func BIF_plus_binary(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return plus_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // Subtraction with auto-overflow from int to float when necessary.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -152,9 +147,8 @@ func minus_n_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 
 	if overflowed {
 		return mlrval.FromFloat(float64(a) - float64(b))
-	} else {
-		return mlrval.FromInt(c)
 	}
+	return mlrval.FromInt(c)
 }
 
 func minus_f_if(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -190,7 +184,6 @@ func BIF_minus_binary(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return minus_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // Multiplication with auto-overflow from int to float when necessary.  See
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -230,9 +223,8 @@ func times_n_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 
 	if math.Abs(c) > 9223372036854774784.0 {
 		return mlrval.FromFloat(c)
-	} else {
-		return mlrval.FromInt(a * b)
 	}
+	return mlrval.FromInt(a * b)
 }
 
 func times_f_if(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -268,7 +260,6 @@ func BIF_times(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return times_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // Pythonic division.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 //
@@ -297,9 +288,8 @@ func divide_n_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	// Pythonic division, not C division.
 	if a%b == 0 {
 		return mlrval.FromInt(a / b)
-	} else {
-		return mlrval.FromFloat(float64(a) / float64(b))
 	}
+	return mlrval.FromFloat(float64(a) / float64(b))
 }
 
 func divide_f_if(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -335,7 +325,6 @@ func BIF_divide(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return divide_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // Integer division: DSL operator '//' as in Python.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -400,7 +389,6 @@ func BIF_int_divide(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return int_divide_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // Non-auto-overflowing addition: DSL operator '.+'.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -440,7 +428,6 @@ func BIF_dot_plus(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return dot_plus_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // Non-auto-overflowing subtraction: DSL operator '.-'.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -480,7 +467,6 @@ func BIF_dot_minus(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return dotminus_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Non-auto-overflowing multiplication: DSL operator '.*'.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -520,7 +506,6 @@ func BIF_dot_times(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return dottimes_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // 64-bit integer division: DSL operator './'.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -560,7 +545,6 @@ func BIF_dot_divide(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return dotdivide_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // 64-bit integer division: DSL operator './/'.  See also
 // https://miller.readthedocs.io/en/latest/reference-main-arithmetic
 
@@ -625,7 +609,6 @@ func BIF_dot_int_divide(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return dotidivide_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Modulus
 
 func modulus_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -693,7 +676,6 @@ func BIF_modulus(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return modulus_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // Pythonic
 func mlrmod(a, m int64) int64 {
 	retval := a % m
@@ -786,7 +768,6 @@ func BIF_mod_exp(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	return imodop(input1, input2, input3, imodexp, "mexp")
 }
 
-// ================================================================
 // MIN AND MAX
 
 // Sort rules (same for min, max, and comparator):
@@ -823,9 +804,8 @@ func min_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	var b int64 = input2.AcquireIntValue()
 	if a < b {
 		return input1
-	} else {
-		return input2
 	}
+	return input2
 }
 
 // min | b=F   b=T
@@ -835,9 +815,8 @@ func min_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 func min_b_bb(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.AcquireBoolValue() {
 		return input1
-	} else {
-		return input2
 	}
+	return input2
 }
 
 func min_s_ss(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -845,9 +824,8 @@ func min_s_ss(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	var b string = input2.AcquireStringValue()
 	if a < b {
 		return input1
-	} else {
-		return input2
 	}
+	return input2
 }
 
 func min_te(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -991,9 +969,8 @@ func max_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	var b int64 = input2.AcquireIntValue()
 	if a > b {
 		return input1
-	} else {
-		return input2
 	}
+	return input2
 }
 
 // max | b=F   b=T
@@ -1003,9 +980,8 @@ func max_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 func max_b_bb(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input2.AcquireBoolValue() {
 		return input1
-	} else {
-		return input2
 	}
+	return input2
 }
 
 func max_s_ss(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -1013,9 +989,8 @@ func max_s_ss(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	var b string = input2.AcquireStringValue()
 	if a > b {
 		return input1
-	} else {
-		return input2
 	}
+	return input2
 }
 
 func max_te(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
diff --git a/pkg/bifs/base.go b/pkg/bifs/base.go
index c259cc7fe..29521261b 100644
--- a/pkg/bifs/base.go
+++ b/pkg/bifs/base.go
@@ -1,4 +1,3 @@
-// ================================================================
 // ABOUT DISPOSITION MATRICES/VECTORS
 //
 // Mlrvals can be of type MT_STRING, MT_INT, MT_FLOAT, MT_BOOLEAN, as well as
@@ -43,7 +42,6 @@
 //   'b' for boolean
 //   'x' for don't-care slots, e.g. eq_b_sx for comparing MT_STRING
 //       ('s') to anything else ('x').
-// ================================================================
 
 package bifs
 
@@ -86,13 +84,11 @@ type VariadicFunc func(inputs []*mlrval.Mlrval) *mlrval.Mlrval
 // Function-pointer type for sorting. Returns < 0 if a < b, 0 if a == b, > 0 if a > b.
 type ComparatorFunc func(*mlrval.Mlrval, *mlrval.Mlrval) int
 
-// ================================================================
 // The following are frequently used in disposition matrices for various
 // operators and are defined here for re-use. The names are VERY short,
 // and all the same length, so that the disposition matrices will look
 // reasonable rectangular even after gofmt has been run.
 
-// ----------------------------------------------------------------
 // Return absent (unary)
 func _absn1(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.ABSENT
@@ -219,9 +215,8 @@ func recurseUnaryFuncOnInput1(unaryFunc UnaryFunc, input1 *mlrval.Mlrval) *mlrva
 			outputMap.PutReference(pe.Key, unaryFunc(pe.Value))
 		}
 		return mlrval.FromMap(outputMap)
-	} else {
-		return unaryFunc(input1)
 	}
+	return unaryFunc(input1)
 }
 
 // recurseBinaryFuncOnInput1 is for fmtifnum and other functions which apply themselves recursively
@@ -243,14 +238,13 @@ func recurseBinaryFuncOnInput1(binaryFunc BinaryFunc, input1, input2 *mlrval.Mlr
 			outputMap.PutReference(pe.Key, binaryFunc(pe.Value, input2))
 		}
 		return mlrval.FromMap(outputMap)
-	} else {
-		return binaryFunc(input1, input2)
 	}
+	return binaryFunc(input1, input2)
 }
 
 func type_error_named_argument(
 	funcname string,
-	expected_type_name string,
+	expectedTypeName string,
 	varname string,
 	varval *mlrval.Mlrval,
 ) *mlrval.Mlrval {
@@ -259,7 +253,7 @@ func type_error_named_argument(
 			"%s: %s should be a %s; got type %s with value %s",
 			funcname,
 			varname,
-			expected_type_name,
+			expectedTypeName,
 			varval.GetTypeName(),
 			varval.StringMaybeQuoted(),
 		),
diff --git a/pkg/bifs/bits.go b/pkg/bifs/bits.go
index c9001c431..f9d0892bc 100644
--- a/pkg/bifs/bits.go
+++ b/pkg/bifs/bits.go
@@ -4,7 +4,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/mlrval"
 )
 
-// ================================================================
 // Bitwise NOT
 
 func bitwise_not_i_i(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -33,7 +32,6 @@ func BIF_bitwise_not(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bitwise_not_dispositions[input1.Type()](input1)
 }
 
-// ================================================================
 // Bit-count
 // https://en.wikipedia.org/wiki/Hamming_weight
 
@@ -77,7 +75,6 @@ func BIF_bitcount(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bitcount_dispositions[input1.Type()](input1)
 }
 
-// ================================================================
 // Bitwise AND
 
 func bitwise_and_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -107,7 +104,6 @@ func BIF_bitwise_and(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bitwise_and_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Bitwise OR
 
 func bitwise_or_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -137,7 +133,6 @@ func BIF_bitwise_or(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bitwise_or_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Bitwise XOR
 
 func bitwise_xor_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -167,7 +162,6 @@ func BIF_bitwise_xor(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bitwise_xor_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Left shift
 
 func lsh_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -197,7 +191,6 @@ func BIF_left_shift(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return left_shift_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Signed right shift
 
 func srsh_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -227,7 +220,6 @@ func BIF_signed_right_shift(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return signed_right_shift_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Unsigned right shift
 
 func ursh_i_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
diff --git a/pkg/bifs/booleans.go b/pkg/bifs/booleans.go
index 181e5cbc6..5dc1a467e 100644
--- a/pkg/bifs/booleans.go
+++ b/pkg/bifs/booleans.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Boolean expressions for ==, !=, >, >=, <, <=
-// ================================================================
 
 package bifs
 
@@ -11,31 +9,27 @@ import (
 func BIF_logical_NOT(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsBool() {
 		return mlrval.FromBool(!input1.AcquireBoolValue())
-	} else {
-		return mlrval.FromTypeErrorUnary("!", input1)
 	}
+	return mlrval.FromTypeErrorUnary("!", input1)
 }
 
 func BIF_logical_AND(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsBool() && input2.IsBool() {
 		return mlrval.FromBool(input1.AcquireBoolValue() && input2.AcquireBoolValue())
-	} else {
-		return mlrval.FromTypeErrorUnary("&&", input1)
 	}
+	return mlrval.FromTypeErrorUnary("&&", input1)
 }
 
 func BIF_logical_OR(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsBool() && input2.IsBool() {
 		return mlrval.FromBool(input1.AcquireBoolValue() || input2.AcquireBoolValue())
-	} else {
-		return mlrval.FromTypeErrorUnary("||", input1)
 	}
+	return mlrval.FromTypeErrorUnary("||", input1)
 }
 
 func BIF_logical_XOR(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsBool() && input2.IsBool() {
 		return mlrval.FromBool(input1.AcquireBoolValue() != input2.AcquireBoolValue())
-	} else {
-		return mlrval.FromTypeErrorUnary("^^", input1)
 	}
+	return mlrval.FromTypeErrorUnary("^^", input1)
 }
diff --git a/pkg/bifs/cmp.go b/pkg/bifs/cmp.go
index 3be517990..501b3dac9 100644
--- a/pkg/bifs/cmp.go
+++ b/pkg/bifs/cmp.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Boolean expressions for ==, !=, >, >=, <, <=
-// ================================================================
 
 package bifs
 
diff --git a/pkg/bifs/collections.go b/pkg/bifs/collections.go
index 65e4544ce..02629fac7 100644
--- a/pkg/bifs/collections.go
+++ b/pkg/bifs/collections.go
@@ -9,7 +9,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/mlrval"
 )
 
-// ================================================================
 // Map/array count. Scalars (including strings) have length 1; strlen is for string length.
 func BIF_length(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	switch input1.Type() {
@@ -173,9 +172,8 @@ func has_key_in_array(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 func has_key_in_map(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input2.IsString() || input2.IsInt() {
 		return mlrval.FromBool(input1.AcquireMapValue().Has(input2.String()))
-	} else {
-		return mlrval.FromNotNamedTypeError("haskey", input2, "string or int")
 	}
+	return mlrval.FromNotNamedTypeError("haskey", input2, "string or int")
 }
 
 func BIF_haskey(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -183,9 +181,8 @@ func BIF_haskey(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 		return has_key_in_array(input1, input2)
 	} else if input1.IsMap() {
 		return has_key_in_map(input1, input2)
-	} else {
-		return mlrval.FromNotCollectionError("haskey", input1)
 	}
+	return mlrval.FromNotCollectionError("haskey", input1)
 }
 
 func BIF_concat(mlrvals []*mlrval.Mlrval) *mlrval.Mlrval {
@@ -325,7 +322,6 @@ func BIF_mapdiff(mlrvals []*mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromMap(newMap)
 }
 
-// ================================================================
 // joink([1,2,3], ",") -> "1,2,3"
 // joink({"a":3,"b":4,"c":5}, ",") -> "a,b,c"
 func BIF_joink(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -356,12 +352,10 @@ func BIF_joink(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 		}
 
 		return mlrval.FromString(buffer.String())
-	} else {
-		return mlrval.FromNotCollectionError("joink", input1)
 	}
+	return mlrval.FromNotCollectionError("joink", input1)
 }
 
-// ----------------------------------------------------------------
 // joinv([3,4,5], ",") -> "3,4,5"
 // joinv({"a":3,"b":4,"c":5}, ",") -> "3,4,5"
 func BIF_joinv(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -392,12 +386,10 @@ func BIF_joinv(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 		}
 
 		return mlrval.FromString(buffer.String())
-	} else {
-		return mlrval.FromNotCollectionError("joinv", input1)
 	}
+	return mlrval.FromNotCollectionError("joinv", input1)
 }
 
-// ----------------------------------------------------------------
 // joinkv([3,4,5], "=", ",") -> "1=3,2=4,3=5"
 // joinkv({"a":3,"b":4,"c":5}, "=", ",") -> "a=3,b=4,c=5"
 func BIF_joinkv(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -437,12 +429,10 @@ func BIF_joinkv(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 		}
 
 		return mlrval.FromString(buffer.String())
-	} else {
-		return mlrval.FromNotCollectionError("joinkv", input1)
 	}
+	return mlrval.FromNotCollectionError("joinkv", input1)
 }
 
-// ================================================================
 // splitkv("a=3,b=4,c=5", "=", ",") -> {"a":3,"b":4,"c":5}
 func BIF_splitkv(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
@@ -477,7 +467,6 @@ func BIF_splitkv(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	return output
 }
 
-// ----------------------------------------------------------------
 // splitkvx("a=3,b=4,c=5", "=", ",") -> {"a":"3","b":"4","c":"5"}
 func BIF_splitkvx(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
@@ -513,7 +502,6 @@ func BIF_splitkvx(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	return output
 }
 
-// ----------------------------------------------------------------
 // splitnv("a,b,c", ",") -> {"1":"a","2":"b","3":"c"}
 func BIF_splitnv(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
@@ -535,7 +523,6 @@ func BIF_splitnv(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return output
 }
 
-// ----------------------------------------------------------------
 // splitnvx("3,4,5", ",") -> {"1":"3","2":"4","3":"5"}
 func BIF_splitnvx(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
@@ -557,7 +544,6 @@ func BIF_splitnvx(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return output
 }
 
-// ----------------------------------------------------------------
 // splita("3,4,5", ",") -> [3,4,5]
 func BIF_splita(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsLegit() {
@@ -581,7 +567,6 @@ func BIF_splita(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromArray(arrayval)
 }
 
-// ----------------------------------------------------------------
 // BIF_splitax splits a string to an array, without type-inference:
 // e.g. splitax("3,4,5", ",") -> ["3","4","5"]
 func BIF_splitax(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -631,9 +616,8 @@ func BIF_get_keys(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 		}
 		return mlrval.FromArray(arrayval)
 
-	} else {
-		return mlrval.FromNotCollectionError("get_keys", input1)
 	}
+	return mlrval.FromNotCollectionError("get_keys", input1)
 }
 
 func BIF_get_values(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -655,9 +639,8 @@ func BIF_get_values(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 		}
 		return mlrval.FromArray(arrayval)
 
-	} else {
-		return mlrval.FromNotCollectionError("get_values", input1)
 	}
+	return mlrval.FromNotCollectionError("get_values", input1)
 }
 
 func BIF_append(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -670,7 +653,6 @@ func BIF_append(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return output
 }
 
-// ----------------------------------------------------------------
 // First argument is prefix.
 // Second argument is delimiter.
 // Third argument is map or array.
@@ -689,9 +671,8 @@ func BIF_flatten(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 
 		retval := input3.FlattenToMap(prefix, delimiter)
 		return &retval
-	} else {
-		return input3
 	}
+	return input3
 }
 
 // flatten($*, ".") is the same as flatten("", ".", $*)
@@ -699,7 +680,6 @@ func BIF_flatten_binary(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return BIF_flatten(mlrval.VOID, input2, input1)
 }
 
-// ----------------------------------------------------------------
 // First argument is a map.
 // Second argument is a delimiter string.
 // unflatten({"a.b.c", ".") is {"a": { "b": { "c": 4}}}.
@@ -716,7 +696,6 @@ func BIF_unflatten(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromMap(newmap)
 }
 
-// ----------------------------------------------------------------
 // Converts maps with "1", "2", ... keys into arrays. Recurses nested data structures.
 func BIF_arrayify(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsMap() {
@@ -745,9 +724,8 @@ func BIF_arrayify(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 			}
 			return mlrval.FromArray(arrayval)
 
-		} else {
-			return input1
 		}
+		return input1
 
 	} else if input1.IsArray() {
 		// TODO: comment (or rethink) that this modifies its inputs!!
@@ -758,9 +736,8 @@ func BIF_arrayify(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 		}
 		return output
 
-	} else {
-		return input1
 	}
+	return input1
 }
 
 func BIF_json_parse(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -768,23 +745,21 @@ func BIF_json_parse(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 		return input1
 	} else if !input1.IsString() {
 		return mlrval.FromNotStringError("json_parse", input1)
-	} else {
-		output := mlrval.FromPending()
-		err := output.UnmarshalJSON([]byte(input1.AcquireStringValue()))
-		if err != nil {
-			return mlrval.FromError(err)
-		}
-		return output
 	}
+	output := mlrval.FromPending()
+	err := output.UnmarshalJSON([]byte(input1.AcquireStringValue()))
+	if err != nil {
+		return mlrval.FromError(err)
+	}
+	return output
 }
 
 func BIF_json_stringify_unary(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	outputBytes, err := input1.MarshalJSON(mlrval.JSON_SINGLE_LINE, false)
 	if err != nil {
 		return mlrval.FromError(err)
-	} else {
-		return mlrval.FromString(string(outputBytes))
 	}
+	return mlrval.FromString(string(outputBytes))
 }
 
 func BIF_json_stringify_binary(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -800,9 +775,8 @@ func BIF_json_stringify_binary(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	outputBytes, err := input1.MarshalJSON(jsonFormatting, false)
 	if err != nil {
 		return mlrval.FromError(err)
-	} else {
-		return mlrval.FromString(string(outputBytes))
 	}
+	return mlrval.FromString(string(outputBytes))
 }
 
 func unaliasArrayIndex(array *[]*mlrval.Mlrval, mindex int) (int, bool) {
@@ -847,20 +821,17 @@ func unaliasArrayLengthIndex(n int, mindex int) (int, bool) {
 		zindex := mindex - 1
 		if mindex <= n { // in bounds
 			return zindex, true
-		} else { // out of bounds
-			return zindex, false
-		}
+		} // out of bounds
+		return zindex, false
 	} else if mindex <= -1 {
 		zindex := mindex + n
 		if -n <= mindex { // in bounds
 			return zindex, true
-		} else { // out of bounds
-			return zindex, false
-		}
-	} else {
-		// mindex is 0
-		return -1, false
+		} // out of bounds
+		return zindex, false
 	}
+	// mindex is 0
+	return -1, false
 }
 
 // MillerSliceAccess is code shared by the string-slicer and the array-slicer.
diff --git a/pkg/bifs/datetime.go b/pkg/bifs/datetime.go
index 6674788d0..85369f9a6 100644
--- a/pkg/bifs/datetime.go
+++ b/pkg/bifs/datetime.go
@@ -49,7 +49,6 @@ func BIF_upntime() *mlrval.Mlrval {
 	)
 }
 
-
 func BIF_sec2gmt_unary(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	floatValue, isNumeric := input1.GetNumericToFloatValue()
 	if !isNumeric {
@@ -244,7 +243,6 @@ func BIF_gmt2localtime_binary(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return BIF_nsec2localtime_ternary(BIF_gmt2nsec(input1), mlrval.FromInt(0), input2)
 }
 
-// ================================================================
 // Argument 1 is int/float seconds since the epoch.
 // Argument 2 is format string like "%Y-%m-%d %H:%M:%S".
 
@@ -386,7 +384,6 @@ func strfntimeHelper(
 	return mlrval.FromString(outputString)
 }
 
-// ----------------------------------------------------------------
 // This is support for %1S .. %9S in format strings, using github.com/lestrrat-go/strftime.
 
 var strftimeExtensions strftime.Option
@@ -467,7 +464,6 @@ func init() {
 	strftimeExtensions = strftime.WithSpecificationSet(ss)
 }
 
-// ================================================================
 // Argument 1 is formatted date string like "2021-03-04 02:59:50".
 // Argument 2 is format string like "%Y-%m-%d %H:%M:%S".
 func BIF_strptime(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -501,9 +497,8 @@ func bif_strptime_unary_aux(input1, input2 *mlrval.Mlrval, doLocal, produceNanos
 
 	if produceNanoseconds {
 		return mlrval.FromInt(t.UnixNano())
-	} else {
-		return mlrval.FromFloat(float64(t.UnixNano()) / 1.0e9)
 	}
+	return mlrval.FromFloat(float64(t.UnixNano()) / 1.0e9)
 }
 
 // Argument 1 is formatted date string like "2021-03-04T02:59:50Z".
@@ -524,7 +519,6 @@ func BIF_localtime2nsec_unary(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bif_strptime_unary_aux(input1, ptr_ISO8601_LOCAL_TIME_FORMAT, true, true)
 }
 
-
 func BIF_strptime_local_binary(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bif_strptime_binary_aux(input1, input2, true, false)
 }
@@ -556,12 +550,10 @@ func bif_strptime_binary_aux(input1, input2 *mlrval.Mlrval, doLocal, produceNano
 
 	if produceNanoseconds {
 		return mlrval.FromInt(t.UnixNano())
-	} else {
-		return mlrval.FromFloat(float64(t.UnixNano()) / 1.0e9)
 	}
+	return mlrval.FromFloat(float64(t.UnixNano()) / 1.0e9)
 }
 
-
 func BIF_strptime_local_ternary(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	return bif_strptime_local_ternary_aux(input1, input2, input3, false)
 }
@@ -605,7 +597,6 @@ func bif_strptime_local_ternary_aux(input1, input2, input3 *mlrval.Mlrval, produ
 
 	if produceNanoseconds {
 		return mlrval.FromInt(t.UnixNano())
-	} else {
-		return mlrval.FromFloat(float64(t.UnixNano()) / 1.0e9)
 	}
+	return mlrval.FromFloat(float64(t.UnixNano()) / 1.0e9)
 }
diff --git a/pkg/bifs/hashing.go b/pkg/bifs/hashing.go
index 829c67601..bba5f030d 100644
--- a/pkg/bifs/hashing.go
+++ b/pkg/bifs/hashing.go
@@ -13,51 +13,47 @@ import (
 func BIF_md5(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
 		return mlrval.FromNotStringError("md5", input1)
-	} else {
-		return mlrval.FromString(
-			fmt.Sprintf(
-				"%x",
-				md5.Sum([]byte(input1.AcquireStringValue())),
-			),
-		)
 	}
+	return mlrval.FromString(
+		fmt.Sprintf(
+			"%x",
+			md5.Sum([]byte(input1.AcquireStringValue())),
+		),
+	)
 }
 
 func BIF_sha1(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
 		return mlrval.FromNotStringError("sha1", input1)
-	} else {
-		return mlrval.FromString(
-			fmt.Sprintf(
-				"%x",
-				sha1.Sum([]byte(input1.AcquireStringValue())),
-			),
-		)
 	}
+	return mlrval.FromString(
+		fmt.Sprintf(
+			"%x",
+			sha1.Sum([]byte(input1.AcquireStringValue())),
+		),
+	)
 }
 
 func BIF_sha256(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
 		return mlrval.FromNotStringError("sha256", input1)
-	} else {
-		return mlrval.FromString(
-			fmt.Sprintf(
-				"%x",
-				sha256.Sum256([]byte(input1.AcquireStringValue())),
-			),
-		)
 	}
+	return mlrval.FromString(
+		fmt.Sprintf(
+			"%x",
+			sha256.Sum256([]byte(input1.AcquireStringValue())),
+		),
+	)
 }
 
 func BIF_sha512(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
 		return mlrval.FromNotStringError("sha512", input1)
-	} else {
-		return mlrval.FromString(
-			fmt.Sprintf(
-				"%x",
-				sha512.Sum512([]byte(input1.AcquireStringValue())),
-			),
-		)
 	}
+	return mlrval.FromString(
+		fmt.Sprintf(
+			"%x",
+			sha512.Sum512([]byte(input1.AcquireStringValue())),
+		),
+	)
 }
diff --git a/pkg/bifs/mathlib.go b/pkg/bifs/mathlib.go
index e68030cfe..884b6b747 100644
--- a/pkg/bifs/mathlib.go
+++ b/pkg/bifs/mathlib.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Go math-library functions
-// ================================================================
 
 package bifs
 
@@ -11,7 +9,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/mlrval"
 )
 
-// ----------------------------------------------------------------
 // Return error (unary math-library func)
 func _math_unary_erro1(input1 *mlrval.Mlrval, f mathLibUnaryFunc, fname string) *mlrval.Mlrval {
 	return mlrval.FromTypeErrorUnary(fname, input1)
@@ -159,7 +156,6 @@ func BIF_sgn(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return imudispo[input1.Type()](input1, lib.Sgn, "sgn")
 } // xxx
 
-// ================================================================
 // Exponentiation: DSL operator '**'.  See also
 // https://johnkerl.org/miller6/reference-main-arithmetic.html
 
@@ -169,9 +165,8 @@ func pow_f_ii(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	// Int raised to int power should be float if it can be (i.e. unless overflow)
 	if float64(ioutput) == foutput {
 		return mlrval.FromInt(ioutput)
-	} else {
-		return mlrval.FromFloat(foutput)
 	}
+	return mlrval.FromFloat(foutput)
 }
 func pow_f_if(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromFloat(math.Pow(float64(input1.AcquireIntValue()), input2.AcquireFloatValue()))
diff --git a/pkg/bifs/percentiles.go b/pkg/bifs/percentiles.go
index 46457da8a..195a19c2d 100644
--- a/pkg/bifs/percentiles.go
+++ b/pkg/bifs/percentiles.go
@@ -18,20 +18,17 @@ func GetPercentileLinearlyInterpolated(
 	iindex := int(math.Floor(findex))
 	if iindex >= n-1 {
 		return array[iindex].Copy()
-	} else {
-		// TODO: just do this in float64:
-		// array[iindex] + frac * (array[iindex+1] - array[iindex])
-		frac := mlrval.FromFloat(findex - float64(iindex))
-		diff := BIF_minus_binary(array[iindex+1], array[iindex])
-		prod := BIF_times(frac, diff)
-		return BIF_plus_binary(array[iindex], prod)
 	}
+	// TODO: just do this in float64:
+	// array[iindex] + frac * (array[iindex+1] - array[iindex])
+	frac := mlrval.FromFloat(findex - float64(iindex))
+	diff := BIF_minus_binary(array[iindex+1], array[iindex])
+	prod := BIF_times(frac, diff)
+	return BIF_plus_binary(array[iindex], prod)
 }
 
-// ================================================================
 // Non-interpolated percentiles (see also https://en.wikipedia.org/wiki/Percentile)
 
-// ----------------------------------------------------------------
 // OPTION 1: int index = p*n/100.0;
 //
 // x
@@ -71,7 +68,6 @@ func GetPercentileLinearlyInterpolated(
 // x_p08 0 x_p18 0 x_p28 25 x_p38 25 x_p48 50 x_p58 50 x_p68 75 x_p78 75 x_p88 100 x_p98 100
 // x_p09 0 x_p19 0 x_p29 25 x_p39 25 x_p49 50 x_p59 50 x_p69 75 x_p79 75 x_p89 100 x_p99 100
 //
-// ----------------------------------------------------------------
 // OPTION 2: int index = p*(n-1)/100.0;
 //
 // x
@@ -111,7 +107,6 @@ func GetPercentileLinearlyInterpolated(
 // x_p08 0 x_p18 0 x_p28 25 x_p38 25 x_p48 25 x_p58 50 x_p68 50 x_p78 75 x_p88 75 x_p98 75
 // x_p09 0 x_p19 0 x_p29 25 x_p39 25 x_p49 25 x_p59 50 x_p69 50 x_p79 75 x_p89 75 x_p99 75
 //
-// ----------------------------------------------------------------
 // OPTION 3: int index = (int)ceil(p*(n-1)/100.0);
 //
 // x
@@ -151,7 +146,6 @@ func GetPercentileLinearlyInterpolated(
 // x_p08 25 x_p18 25 x_p28 50 x_p38 50 x_p48 50 x_p58 75 x_p68 75 x_p78 100 x_p88 100 x_p98 100
 // x_p09 25 x_p19 25 x_p29 50 x_p39 50 x_p49 50 x_p59 75 x_p69 75 x_p79 100 x_p89 100 x_p99 100
 //
-// ----------------------------------------------------------------
 // OPTION 4: int index = (int)ceil(-0.5 + p*(n-1)/100.0);
 //
 // x
@@ -191,7 +185,6 @@ func GetPercentileLinearlyInterpolated(
 // x_p08 0 x_p18 25 x_p28 25 x_p38 50 x_p48 50 x_p58 50 x_p68 75 x_p78 75 x_p88 100 x_p98 100
 // x_p09 0 x_p19 25 x_p29 25 x_p39 50 x_p49 50 x_p59 50 x_p69 75 x_p79 75 x_p89 100 x_p99 100
 //
-// ----------------------------------------------------------------
 // CONCLUSION:
 // * I like option 2 for its simplicity ...
 // * ... but option 1 matches R's quantile with type=1.
diff --git a/pkg/bifs/regex.go b/pkg/bifs/regex.go
index 2095003a6..f3abad38a 100644
--- a/pkg/bifs/regex.go
+++ b/pkg/bifs/regex.go
@@ -206,10 +206,9 @@ func BIF_string_does_not_match_regexp(input1, input2 *mlrval.Mlrval) (retval *ml
 	output, captures := BIF_string_matches_regexp(input1, input2)
 	if output.IsBool() {
 		return mlrval.FromBool(!output.AcquireBoolValue()), captures
-	} else {
-		// else leave it as error, absent, etc.
-		return output, captures
 	}
+	// else leave it as error, absent, etc.
+	return output, captures
 }
 
 func BIF_regextract(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -223,9 +222,8 @@ func BIF_regextract(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	match := regex.FindStringIndex(input1.AcquireStringValue())
 	if match != nil {
 		return mlrval.FromString(input1.AcquireStringValue()[match[0]:match[1]])
-	} else {
-		return mlrval.ABSENT
 	}
+	return mlrval.ABSENT
 }
 
 func BIF_regextract_or_else(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -239,7 +237,6 @@ func BIF_regextract_or_else(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrva
 	match := regex.FindStringIndex(input1.AcquireStringValue())
 	if match != nil {
 		return mlrval.FromString(input1.AcquireStringValue()[match[0]:match[1]])
-	} else {
-		return input3
 	}
+	return input3
 }
diff --git a/pkg/bifs/stats.go b/pkg/bifs/stats.go
index 77eef481c..227d3b140 100644
--- a/pkg/bifs/stats.go
+++ b/pkg/bifs/stats.go
@@ -8,7 +8,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/mlrval"
 )
 
-// ----------------------------------------------------------------
 // We would need a second pass through the data to compute the error-bars given
 // the data and the m and the b.
 //
@@ -61,7 +60,6 @@ func BIF_finalize_mean_eb(mn, msum, msum2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return BIF_sqrt(BIF_divide(mvar, mn))
 }
 
-// ----------------------------------------------------------------
 // Unbiased estimator:
 //    (1/n)   sum{(xi-mean)**3}
 //  -----------------------------
@@ -146,7 +144,6 @@ func BIF_finalize_kurtosis(mn, msum, msum2, msum3, msum4 *mlrval.Mlrval) *mlrval
 
 }
 
-// ================================================================
 // STATS ROUTINES -- other than min/max which are placed separately.
 
 // This is a helper function for BIFs which operate only on array or map.
@@ -183,30 +180,28 @@ func collection_sum_of_function(
 }
 
 func BIF_count(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "count")
+	ok, valueIfNot := check_collection(collection, "count")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	if collection.IsArray() {
 		arrayval := collection.AcquireArrayValue()
 		return mlrval.FromInt(int64(len(arrayval)))
-	} else {
-		mapval := collection.AcquireMapValue()
-		return mlrval.FromInt(mapval.FieldCount)
 	}
+	mapval := collection.AcquireMapValue()
+	return mlrval.FromInt(mapval.FieldCount)
 }
 
 func BIF_null_count(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "null_count")
+	ok, valueIfNot := check_collection(collection, "null_count")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	f := func(element *mlrval.Mlrval) *mlrval.Mlrval {
 		if element.IsVoid() || element.IsNull() {
 			return mlrval.FromInt(1)
-		} else {
-			return mlrval.FromInt(0)
 		}
+		return mlrval.FromInt(0)
 	}
 	return mlrval.CollectionFold(
 		collection,
@@ -218,9 +213,9 @@ func BIF_null_count(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_distinct_count(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "distinct_count")
+	ok, valueIfNot := check_collection(collection, "distinct_count")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	counts := make(map[string]int)
 	if collection.IsArray() {
@@ -252,9 +247,9 @@ func bif_mode_or_antimode(
 	funcname string,
 	cmp func(int, int) bool,
 ) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, funcname)
+	ok, valueIfNot := check_collection(collection, funcname)
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 
 	// Do not use a Go map[string]int as that makes the output in the case of ties
@@ -313,9 +308,9 @@ func bif_mode_or_antimode(
 }
 
 func BIF_sum(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "sum")
+	ok, valueIfNot := check_collection(collection, "sum")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	return collection_sum_of_function(
 		collection,
@@ -326,9 +321,9 @@ func BIF_sum(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_sum2(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "sum2")
+	ok, valueIfNot := check_collection(collection, "sum2")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	f := func(element *mlrval.Mlrval) *mlrval.Mlrval {
 		return BIF_times(element, element)
@@ -337,9 +332,9 @@ func BIF_sum2(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_sum3(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "sum3")
+	ok, valueIfNot := check_collection(collection, "sum3")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	f := func(element *mlrval.Mlrval) *mlrval.Mlrval {
 		return BIF_times(element, BIF_times(element, element))
@@ -348,9 +343,9 @@ func BIF_sum3(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_sum4(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "sum4")
+	ok, valueIfNot := check_collection(collection, "sum4")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	f := func(element *mlrval.Mlrval) *mlrval.Mlrval {
 		sq := BIF_times(element, element)
@@ -360,9 +355,9 @@ func BIF_sum4(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_mean(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "mean")
+	ok, valueIfNot := check_collection(collection, "mean")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	n := BIF_count(collection)
 	if n.AcquireIntValue() == 0 {
@@ -373,9 +368,9 @@ func BIF_mean(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_meaneb(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "meaneb")
+	ok, valueIfNot := check_collection(collection, "meaneb")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	n := BIF_count(collection)
 	sum := BIF_sum(collection)
@@ -384,9 +379,9 @@ func BIF_meaneb(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_variance(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "variance")
+	ok, valueIfNot := check_collection(collection, "variance")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	n := BIF_count(collection)
 	sum := BIF_sum(collection)
@@ -395,9 +390,9 @@ func BIF_variance(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_stddev(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "stddev")
+	ok, valueIfNot := check_collection(collection, "stddev")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	n := BIF_count(collection)
 	sum := BIF_sum(collection)
@@ -406,9 +401,9 @@ func BIF_stddev(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_skewness(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "skewness")
+	ok, valueIfNot := check_collection(collection, "skewness")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	n := BIF_count(collection)
 	sum := BIF_sum(collection)
@@ -418,9 +413,9 @@ func BIF_skewness(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_kurtosis(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "kurtosis")
+	ok, valueIfNot := check_collection(collection, "kurtosis")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	n := BIF_count(collection)
 	sum := BIF_sum(collection)
@@ -431,33 +426,31 @@ func BIF_kurtosis(collection *mlrval.Mlrval) *mlrval.Mlrval {
 }
 
 func BIF_minlen(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "minlen")
+	ok, valueIfNot := check_collection(collection, "minlen")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	if collection.IsArray() {
 		return BIF_minlen_variadic(collection.AcquireArrayValue())
-	} else {
-		return BIF_minlen_within_map_values(collection.AcquireMapValue())
 	}
+	return BIF_minlen_within_map_values(collection.AcquireMapValue())
 }
 
 func BIF_maxlen(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "maxlen")
+	ok, valueIfNot := check_collection(collection, "maxlen")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 	if collection.IsArray() {
 		return BIF_maxlen_variadic(collection.AcquireArrayValue())
-	} else {
-		return BIF_maxlen_within_map_values(collection.AcquireMapValue())
 	}
+	return BIF_maxlen_within_map_values(collection.AcquireMapValue())
 }
 
 func BIF_sort_collection(collection *mlrval.Mlrval) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, "sort_collection")
+	ok, valueIfNot := check_collection(collection, "sort_collection")
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 
 	var array []*mlrval.Mlrval
@@ -539,9 +532,9 @@ func bif_percentile_with_options_aux(
 	outputs := bif_percentiles_with_options_aux(collection, percentiles, options, funcname)
 
 	// Check for error/absent returns from the main impl body
-	ok, value_if_not := check_collection(outputs, funcname)
+	ok, valueIfNot := check_collection(outputs, funcname)
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 
 	return outputs.AcquireMapValue().Head.Value
@@ -553,14 +546,14 @@ func bif_percentiles_with_options_aux(
 	options *mlrval.Mlrval,
 	funcname string,
 ) *mlrval.Mlrval {
-	ok, value_if_not := check_collection(collection, funcname)
+	ok, valueIfNot := check_collection(collection, funcname)
 	if !ok {
-		return value_if_not
+		return valueIfNot
 	}
 
-	array_is_sorted := false
-	interpolate_linearly := false
-	output_array_not_map := false
+	arrayIsSorted := false
+	interpolateLinearly := false
+	outputArrayNotMap := false
 
 	if options != nil {
 		om := options.GetMap()
@@ -570,25 +563,25 @@ func bif_percentiles_with_options_aux(
 		for pe := om.Head; pe != nil; pe = pe.Next {
 			if pe.Key == "array_is_sorted" || pe.Key == "ais" {
 				if mlrval.Equals(pe.Value, mlrval.TRUE) {
-					array_is_sorted = true
+					arrayIsSorted = true
 				} else if mlrval.Equals(pe.Value, mlrval.FALSE) {
-					array_is_sorted = false
+					arrayIsSorted = false
 				} else {
 					return type_error_named_argument(funcname, "boolean", pe.Key, pe.Value)
 				}
 			} else if pe.Key == "interpolate_linearly" || pe.Key == "il" {
 				if mlrval.Equals(pe.Value, mlrval.TRUE) {
-					interpolate_linearly = true
+					interpolateLinearly = true
 				} else if mlrval.Equals(pe.Value, mlrval.FALSE) {
-					interpolate_linearly = false
+					interpolateLinearly = false
 				} else {
 					return type_error_named_argument(funcname, "boolean", pe.Key, pe.Value)
 				}
 			} else if pe.Key == "output_array_not_map" || pe.Key == "oa" {
 				if mlrval.Equals(pe.Value, mlrval.TRUE) {
-					output_array_not_map = true
+					outputArrayNotMap = true
 				} else if mlrval.Equals(pe.Value, mlrval.FALSE) {
-					output_array_not_map = false
+					outputArrayNotMap = false
 				} else {
 					return type_error_named_argument(funcname, "boolean", pe.Key, pe.Value)
 				}
@@ -596,30 +589,30 @@ func bif_percentiles_with_options_aux(
 		}
 	}
 
-	var sorted_array *mlrval.Mlrval
-	if array_is_sorted {
+	var sortedArray *mlrval.Mlrval
+	if arrayIsSorted {
 		if !collection.IsArray() {
 			return mlrval.FromNotArrayError(funcname+" collection", collection)
 		}
-		sorted_array = collection
+		sortedArray = collection
 	} else {
-		sorted_array = BIF_sort_collection(collection)
+		sortedArray = BIF_sort_collection(collection)
 	}
 
 	return bif_percentiles_impl(
-		sorted_array.AcquireArrayValue(),
+		sortedArray.AcquireArrayValue(),
 		percentiles,
-		interpolate_linearly,
-		output_array_not_map,
+		interpolateLinearly,
+		outputArrayNotMap,
 		funcname,
 	)
 }
 
 func bif_percentiles_impl(
-	sorted_array []*mlrval.Mlrval,
+	sortedArray []*mlrval.Mlrval,
 	percentiles *mlrval.Mlrval,
-	interpolate_linearly bool,
-	output_array_not_map bool,
+	interpolateLinearly bool,
+	outputArrayNotMap bool,
 	funcname string,
 ) *mlrval.Mlrval {
 
@@ -634,25 +627,24 @@ func bif_percentiles_impl(
 		p, ok := ps[i].GetNumericToFloatValue()
 		if !ok {
 			outputs[i] = type_error_named_argument(funcname, "numeric", "percentile", ps[i])
-		} else if len(sorted_array) == 0 {
+		} else if len(sortedArray) == 0 {
 			outputs[i] = mlrval.VOID
 		} else {
-			if interpolate_linearly {
-				outputs[i] = GetPercentileLinearlyInterpolated(sorted_array, len(sorted_array), p)
+			if interpolateLinearly {
+				outputs[i] = GetPercentileLinearlyInterpolated(sortedArray, len(sortedArray), p)
 			} else {
-				outputs[i] = GetPercentileNonInterpolated(sorted_array, len(sorted_array), p)
+				outputs[i] = GetPercentileNonInterpolated(sortedArray, len(sortedArray), p)
 			}
 		}
 	}
 
-	if output_array_not_map {
+	if outputArrayNotMap {
 		return mlrval.FromArray(outputs)
-	} else {
-		m := mlrval.NewMlrmap()
-		for i := range ps {
-			sp := ps[i].String()
-			m.PutCopy(sp, outputs[i])
-		}
-		return mlrval.FromMap(m)
 	}
+	m := mlrval.NewMlrmap()
+	for i := range ps {
+		sp := ps[i].String()
+		m.PutCopy(sp, outputs[i])
+	}
+	return mlrval.FromMap(m)
 }
diff --git a/pkg/bifs/strings.go b/pkg/bifs/strings.go
index 92099e590..1cecb39fe 100644
--- a/pkg/bifs/strings.go
+++ b/pkg/bifs/strings.go
@@ -14,16 +14,14 @@ import (
 func BIF_strlen(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if !input1.IsStringOrVoid() {
 		return mlrval.FromTypeErrorUnary("strlen", input1)
-	} else {
-		return mlrval.FromInt(lib.UTF8Strlen(input1.AcquireStringValue()))
 	}
+	return mlrval.FromInt(lib.UTF8Strlen(input1.AcquireStringValue()))
 }
 
 func BIF_string(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromString(input1.String())
 }
 
-// ================================================================
 // Dot operator, with loose typecasting.
 //
 // For most operations, I don't like loose typecasting -- for example, in PHP
@@ -64,7 +62,6 @@ func BIF_dot(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return dot_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ================================================================
 // substr1(s,m,n) gives substring of s from 1-up position m to n inclusive.
 // Negative indices -len .. -1 alias to 0 .. len-1.
 
@@ -96,7 +93,6 @@ func BIF_substr_1_up(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromString(string(runes[lowerZindex : upperZindex+1]))
 }
 
-// ================================================================
 // substr0(s,m,n) gives substring of s from 0-up position m to n inclusive.
 // Negative indices -len .. -1 alias to 0 .. len-1.
 
@@ -128,7 +124,6 @@ func BIF_substr_0_up(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromString(string(runes[lowerZindex : upperZindex+1]))
 }
 
-// ================================================================
 // index(string, substring) returns the index of substring within string (if found), or -1 if not
 // found.
 
@@ -152,7 +147,6 @@ func BIF_index(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromInt(lib.UTF8Strlen(sinput1[:iindex]) + 1)
 }
 
-// ================================================================
 // contains(string, substring) returns true if string contains substring, else false.
 
 func BIF_contains(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -189,9 +183,8 @@ func BIF_truncate(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	maxLength := int(input2.AcquireIntValue())
 	if oldLength <= maxLength {
 		return input1
-	} else {
-		return mlrval.FromString(string(runes[0:maxLength]))
 	}
+	return mlrval.FromString(string(runes[0:maxLength]))
 }
 
 func BIF_leftpad(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -263,25 +256,22 @@ func BIF_rightpad(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 func BIF_lstrip(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsString() {
 		return mlrval.FromString(strings.TrimLeft(input1.AcquireStringValue(), " \t"))
-	} else {
-		return input1
 	}
+	return input1
 }
 
 func BIF_rstrip(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsString() {
 		return mlrval.FromString(strings.TrimRight(input1.AcquireStringValue(), " \t"))
-	} else {
-		return input1
 	}
+	return input1
 }
 
 func BIF_strip(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsString() {
 		return mlrval.FromString(strings.Trim(input1.AcquireStringValue(), " \t"))
-	} else {
-		return input1
 	}
+	return input1
 }
 
 func BIF_collapse_whitespace(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -291,9 +281,8 @@ func BIF_collapse_whitespace(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 func BIF_collapse_whitespace_regexp(input1 *mlrval.Mlrval, whitespaceRegexp *regexp.Regexp) *mlrval.Mlrval {
 	if input1.IsString() {
 		return mlrval.FromString(whitespaceRegexp.ReplaceAllString(input1.AcquireStringValue(), " "))
-	} else {
-		return input1
 	}
+	return input1
 }
 
 var _whitespace_regexp = regexp.MustCompile(`\s+`)
@@ -303,9 +292,8 @@ func BIF_toupper(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 		return mlrval.FromString(strings.ToUpper(input1.AcquireStringValue()))
 	} else if input1.IsVoid() {
 		return input1
-	} else {
-		return input1
 	}
+	return input1
 }
 
 func BIF_tolower(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -313,26 +301,23 @@ func BIF_tolower(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 		return mlrval.FromString(strings.ToLower(input1.AcquireStringValue()))
 	} else if input1.IsVoid() {
 		return input1
-	} else {
-		return input1
 	}
+	return input1
 }
 
 func BIF_capitalize(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsString() {
 		if input1.AcquireStringValue() == "" {
 			return input1
-		} else {
-			runes := []rune(input1.AcquireStringValue())
-			rfirst := runes[0]
-			rrest := runes[1:]
-			sfirst := strings.ToUpper(string(rfirst))
-			srest := string(rrest)
-			return mlrval.FromString(sfirst + srest)
 		}
-	} else {
-		return input1
+		runes := []rune(input1.AcquireStringValue())
+		rfirst := runes[0]
+		rrest := runes[1:]
+		sfirst := strings.ToUpper(string(rfirst))
+		srest := string(rrest)
+		return mlrval.FromString(sfirst + srest)
 	}
+	return input1
 }
 
 func BIF_clean_whitespace(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -470,9 +455,8 @@ func bif_unformat_aux(input1, input2 *mlrval.Mlrval, inferTypes bool) *mlrval.Ml
 func BIF_hexfmt(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsInt() {
 		return mlrval.FromString("0x" + strconv.FormatUint(uint64(input1.AcquireIntValue()), 16))
-	} else {
-		return input1
 	}
+	return input1
 }
 
 func fmtnum_is(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -538,21 +522,19 @@ var fmtnum_dispositions = [mlrval.MT_DIM][mlrval.MT_DIM]BinaryFunc{
 func BIF_fmtnum(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsArray() || input1.IsMap() {
 		return recurseBinaryFuncOnInput1(BIF_fmtnum, input1, input2)
-	} else {
-		return fmtnum_dispositions[input1.Type()][input2.Type()](input1, input2)
 	}
+	return fmtnum_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
 func BIF_fmtifnum(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsArray() || input1.IsMap() {
 		return recurseBinaryFuncOnInput1(BIF_fmtifnum, input1, input2)
+	}
+	output := fmtnum_dispositions[input1.Type()][input2.Type()](input1, input2)
+	if output.IsError() {
+		return input1
 	} else {
-		output := fmtnum_dispositions[input1.Type()][input2.Type()](input1, input2)
-		if output.IsError() {
-			return input1
-		} else {
-			return output
-		}
+		return output
 	}
 }
 
@@ -565,12 +547,10 @@ func BIF_latin1_to_utf8(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 			// Somewhat arbitrary design decision
 			// return input1
 			return mlrval.FromError(err)
-		} else {
-			return mlrval.FromString(output)
 		}
-	} else {
-		return input1
+		return mlrval.FromString(output)
 	}
+	return input1
 }
 
 func BIF_utf8_to_latin1(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -582,10 +562,8 @@ func BIF_utf8_to_latin1(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 			// Somewhat arbitrary design decision
 			// return input1
 			return mlrval.FromError(err)
-		} else {
-			return mlrval.FromString(output)
 		}
-	} else {
-		return input1
+		return mlrval.FromString(output)
 	}
+	return input1
 }
diff --git a/pkg/bifs/system.go b/pkg/bifs/system.go
index e734f2998..c3904689c 100644
--- a/pkg/bifs/system.go
+++ b/pkg/bifs/system.go
@@ -23,9 +23,8 @@ func BIF_hostname() *mlrval.Mlrval {
 	hostname, err := os.Hostname()
 	if err != nil {
 		return mlrval.FromErrorString("could not retrieve system hostname")
-	} else {
-		return mlrval.FromString(hostname)
 	}
+	return mlrval.FromString(hostname)
 }
 
 func BIF_system(input1 *mlrval.Mlrval) *mlrval.Mlrval {
diff --git a/pkg/bifs/types.go b/pkg/bifs/types.go
index cbebed0ba..ec21b7122 100644
--- a/pkg/bifs/types.go
+++ b/pkg/bifs/types.go
@@ -18,16 +18,15 @@ func string_to_int(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	i, ok := lib.TryIntFromString(input1.AcquireStringValue())
 	if ok {
 		return mlrval.FromInt(i)
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(
-				"%s: unacceptable value %s with type %s",
-				"int",
-				input1.StringMaybeQuoted(),
-				input1.GetTypeName(),
-			),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(
+			"%s: unacceptable value %s with type %s",
+			"int",
+			input1.StringMaybeQuoted(),
+			input1.GetTypeName(),
+		),
+	)
 }
 
 func float_to_int(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -37,9 +36,8 @@ func float_to_int(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 func bool_to_int(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.AcquireBoolValue() {
 		return mlrval.FromInt(1)
-	} else {
-		return mlrval.FromInt(0)
 	}
+	return mlrval.FromInt(0)
 }
 
 func to_int_te(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -68,16 +66,15 @@ func string_to_int_with_base(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	i, ok := lib.TryIntFromStringWithBase(input1.AcquireStringValue(), input2.AcquireIntValue())
 	if ok {
 		return mlrval.FromInt(i)
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(
-				"%s: unacceptable value %s with type %s",
-				"int",
-				input1.StringMaybeQuoted(),
-				input1.GetTypeName(),
-			),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(
+			"%s: unacceptable value %s with type %s",
+			"int",
+			input1.StringMaybeQuoted(),
+			input1.GetTypeName(),
+		),
+	)
 }
 
 func int_to_int_with_base(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -91,9 +88,8 @@ func float_to_int_with_base(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 func bool_to_int_with_base(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.AcquireBoolValue() {
 		return mlrval.FromInt(1)
-	} else {
-		return mlrval.FromInt(0)
 	}
+	return mlrval.FromInt(0)
 }
 
 func to_int_with_base_te(input1, input2 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -125,16 +121,15 @@ func string_to_float(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	f, ok := lib.TryFloatFromString(input1.AcquireStringValue())
 	if ok {
 		return mlrval.FromFloat(f)
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(
-				"%s: unacceptable value %s with type %s",
-				"float",
-				input1.StringMaybeQuoted(),
-				input1.GetTypeName(),
-			),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(
+			"%s: unacceptable value %s with type %s",
+			"float",
+			input1.StringMaybeQuoted(),
+			input1.GetTypeName(),
+		),
+	)
 }
 
 func int_to_float(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -144,9 +139,8 @@ func int_to_float(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 func bool_to_float(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.AcquireBoolValue() {
 		return mlrval.FromFloat(1.0)
-	} else {
-		return mlrval.FromFloat(0.0)
 	}
+	return mlrval.FromFloat(0.0)
 }
 
 func to_float_te(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -175,16 +169,15 @@ func string_to_boolean(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	b, ok := lib.TryBoolFromBoolString(input1.AcquireStringValue())
 	if ok {
 		return mlrval.FromBool(b)
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(
-				"%s: unacceptable value %s with type %s",
-				"boolean",
-				input1.StringMaybeQuoted(),
-				input1.GetTypeName(),
-			),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(
+			"%s: unacceptable value %s with type %s",
+			"boolean",
+			input1.StringMaybeQuoted(),
+			input1.GetTypeName(),
+		),
+	)
 }
 
 func int_to_bool(input1 *mlrval.Mlrval) *mlrval.Mlrval {
@@ -235,12 +228,10 @@ func BIF_is_empty(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	} else if input1.IsString() {
 		if input1.AcquireStringValue() == "" {
 			return mlrval.TRUE
-		} else {
-			return mlrval.FALSE
 		}
-	} else {
 		return mlrval.FALSE
 	}
+	return mlrval.FALSE
 }
 func BIF_is_emptymap(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromBool(input1.IsMap() && input1.AcquireMapValue().IsEmpty())
@@ -268,12 +259,10 @@ func BIF_is_notempty(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	} else if input1.IsString() {
 		if input1.AcquireStringValue() == "" {
 			return mlrval.FALSE
-		} else {
-			return mlrval.TRUE
 		}
-	} else {
 		return mlrval.TRUE
 	}
+	return mlrval.TRUE
 }
 func BIF_is_notmap(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	return mlrval.FromBool(!input1.IsMap())
@@ -300,9 +289,8 @@ func BIF_is_nan(input1 *mlrval.Mlrval) *mlrval.Mlrval {
 	fval, ok := input1.GetFloatValue()
 	if ok {
 		return mlrval.FromBool(math.IsNaN(fval))
-	} else {
-		return mlrval.FALSE
 	}
+	return mlrval.FALSE
 }
 
 func assertingCommon(input1, check *mlrval.Mlrval, description string, context *types.Context) *mlrval.Mlrval {
diff --git a/pkg/cli/flag_types.go b/pkg/cli/flag_types.go
index f1eef4772..f70102c79 100644
--- a/pkg/cli/flag_types.go
+++ b/pkg/cli/flag_types.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Miller support for command-line flags.
 //
 // * Flags are used for several purposes:
@@ -33,7 +32,6 @@
 //   mlr, and -f/-n/-r etc can be used more than once for mlr sort, etc. I also
 //   insist on total control of flag formatting including alphabetization of
 //   flags for on-line help and documentation systems.
-// ================================================================
 
 package cli
 
@@ -46,7 +44,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/lib"
 )
 
-// ----------------------------------------------------------------
 // Data types used within the flags table.
 
 // FlagParser is a function which takes a flag such as `--foo`.
@@ -64,8 +61,6 @@ type FlagParser func(
 	options *TOptions,
 )
 
-// ----------------------------------------------------------------
-
 // FlagTable holds all the flags for Miller, organized into sections.
 type FlagTable struct {
 	sections []*FlagSection
@@ -121,7 +116,6 @@ type Flag struct {
 	suppressFlagEnumeration bool
 }
 
-// ================================================================
 // FlagTable methods
 
 // Sort organizes the sections in the table alphabetically, to make on-line
@@ -328,7 +322,6 @@ func (ft *FlagTable) NilCheck() {
 	fmt.Println("Flag-table nil check completed successfully.")
 }
 
-// ================================================================
 // FlagSection methods
 
 // Sort organizes the flags in the section alphabetically, to make on-line help
@@ -388,7 +381,6 @@ func (fs *FlagSection) NilCheck() {
 	}
 }
 
-// ================================================================
 // Flag methods
 
 // Owns determines whether this object handles a command-line flag such as
@@ -525,7 +517,6 @@ func (flag *Flag) NilCheck() {
 	lib.InternalCodingErrorWithMessageIf(flag.parser == nil, "Nil parser help for flag "+flag.name)
 }
 
-// ================================================================
 // Helper methods
 
 // NoOpParse1 is a helper function for flags which take no argument and are
diff --git a/pkg/cli/flatten_unflatten.go b/pkg/cli/flatten_unflatten.go
index ce5711757..bd2593f2a 100644
--- a/pkg/cli/flatten_unflatten.go
+++ b/pkg/cli/flatten_unflatten.go
@@ -1,10 +1,8 @@
 package cli
 
-// ================================================================
 // Decide whether to insert a flatten or unflatten verb at the end of the
 // chain.  See also repl/verbs.go which handles the same issue in the REPL.
 //
-// ----------------------------------------------------------------
 // PROBLEM TO BE SOLVED:
 //
 // JSON has nested structures and CSV et al. do not. For example:
@@ -22,7 +20,6 @@ package cli
 //   "req.path":   "api/check"
 // }
 //
-// ----------------------------------------------------------------
 // APPROACH:
 //
 // Use the Principle of Least Surprise (POLS).
diff --git a/pkg/cli/mlrcli_util.go b/pkg/cli/mlrcli_util.go
index 4da61000c..f7051feec 100644
--- a/pkg/cli/mlrcli_util.go
+++ b/pkg/cli/mlrcli_util.go
@@ -21,9 +21,8 @@ func SeparatorFromArg(name string) string {
 	sep, ok := SEPARATOR_NAMES_TO_VALUES[name]
 	if ok {
 		return sep
-	} else {
-		return name
 	}
+	return name
 }
 
 // SeparatorRegexFromArg is for letting people do things like `--ifs-regex whitespace`
@@ -32,7 +31,6 @@ func SeparatorRegexFromArg(name string) string {
 	sep, ok := SEPARATOR_REGEX_NAMES_TO_VALUES[name]
 	if ok {
 		return sep
-	} else {
-		return name
 	}
+	return name
 }
diff --git a/pkg/cli/option_parse.go b/pkg/cli/option_parse.go
index f67ea62b1..1a6562a2d 100644
--- a/pkg/cli/option_parse.go
+++ b/pkg/cli/option_parse.go
@@ -1,8 +1,6 @@
-// ================================================================
 // Items which might better belong in miller/cli, but which are placed in a
 // deeper package to avoid a package-dependency cycle between miller/cli and
 // miller/transforming.
-// ================================================================
 
 package cli
 
@@ -66,7 +64,7 @@ func FinalizeReaderOptions(readerOptions *TReaderOptions) error {
 }
 
 // FinalizeWriterOptions unbackslashes OPS, OFS, and ORS.  This is because
-// because the '\n' at the command line which is Go "\\n" (a backslash and an
+// the '\n' at the command line which is Go "\\n" (a backslash and an
 // n) needs to become the single newline character., and likewise for "\t", etc.
 func FinalizeWriterOptions(writerOptions *TWriterOptions) error {
 	if !writerOptions.ofsWasSpecified {
@@ -117,7 +115,6 @@ func init() {
 	FLAG_TABLE.Sort()
 }
 
-// ================================================================
 // SEPARATOR FLAGS
 
 func SeparatorPrintInfo() {
@@ -416,7 +413,6 @@ var SeparatorFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // JSON-ONLY FLAGS
 
 func JSONOnlyPrintInfo() {
@@ -496,7 +492,6 @@ var JSONOnlyFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // PPRINT-ONLY FLAGS
 
 func PPRINTOnlyPrintInfo() {
@@ -541,7 +536,6 @@ var PPRINTOnlyFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // DKVP-ONLY FLAGS
 
 func DKVPOnlyPrintInfo() {
@@ -566,7 +560,6 @@ var DKVPOnlyFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // LEGACY FLAGS
 
 func LegacyFlagInfoPrint() {
@@ -663,7 +656,6 @@ var LegacyFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // FILE-FORMAT FLAGS
 
 func FileFormatPrintInfo() {
@@ -1273,7 +1265,6 @@ var FileFormatFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // FORMAT-CONVERSION KEYSTROKE-SAVER FLAGS
 
 func FormatConversionKeystrokeSaverPrintInfo() {
@@ -2670,7 +2661,6 @@ var FormatConversionKeystrokeSaverFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // CSV/TSV FLAGS
 
 func CSVTSVOnlyPrintInfo() {
@@ -2772,7 +2762,6 @@ var CSVTSVOnlyFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // COMPRESSED-DATA FLAGS
 
 func CompressedDataPrintInfo() {
@@ -2916,7 +2905,6 @@ var CompressedDataFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // COMMENTS-IN-DATA FLAGS
 
 func CommentsInDataPrintInfo() {
@@ -2992,7 +2980,6 @@ var CommentsInDataFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // OUTPUT-COLORIZATION FLAGS
 
 func OutputColorizationPrintInfo() {
@@ -3183,7 +3170,6 @@ var OutputColorizationFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // FLATTEN/UNFLATTEN FLAGS
 
 func FlattenUnflattenPrintInfo() {
@@ -3231,7 +3217,6 @@ var FlattenUnflattenFlagSection = FlagSection{
 	},
 }
 
-// ================================================================
 // PROFILING FLAGS
 
 func ProfilingPrintInfo() {
@@ -3276,7 +3261,6 @@ This flag must be the very first thing after 'mlr' on the command line.`,
 	},
 }
 
-// ================================================================
 // MISC FLAGS
 
 func MiscPrintInfo() {
@@ -3360,7 +3344,7 @@ var MiscFlagSection = FlagSection{
 				handle, err := os.Open(fileName)
 				if err != nil {
 					/// XXXX return false
-					fmt.Fprintln(os.Stderr, "mlr", err)
+					fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 					os.Exit(1)
 				}
 				defer handle.Close()
@@ -3379,7 +3363,7 @@ var MiscFlagSection = FlagSection{
 					lineno++
 
 					if err != nil {
-						fmt.Fprintln(os.Stderr, "mlr", err)
+						fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 						os.Exit(1)
 					}
 
diff --git a/pkg/cli/option_types.go b/pkg/cli/option_types.go
index e0d76f500..9924382d7 100644
--- a/pkg/cli/option_types.go
+++ b/pkg/cli/option_types.go
@@ -1,8 +1,6 @@
-// ================================================================
 // Items which might better belong in miller/cli, but which are placed in a
 // deeper package to avoid a package-dependency cycle between miller/cli and
 // miller/transforming.
-// ================================================================
 
 package cli
 
@@ -211,8 +209,8 @@ func DefaultOptions() *TOptions {
 		ReaderOptions: DefaultReaderOptions(),
 		WriterOptions: DefaultWriterOptions(),
 
-		FileNames:           make([]string, 0),
-		DSLPreloadFileNames: make([]string, 0),
+		FileNames:           []string{},
+		DSLPreloadFileNames: []string{},
 		NoInput:             false,
 	}
 }
diff --git a/pkg/cli/verb_utils.go b/pkg/cli/verb_utils.go
index d20901998..1789d5163 100644
--- a/pkg/cli/verb_utils.go
+++ b/pkg/cli/verb_utils.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Utilities for Miller verbs to share for command-line parsing.
-// ================================================================
 
 package cli
 
diff --git a/pkg/climain/mlrcli_mlrrc.go b/pkg/climain/mlrcli_mlrrc.go
index ce0a85789..1cdf91d41 100644
--- a/pkg/climain/mlrcli_mlrrc.go
+++ b/pkg/climain/mlrcli_mlrrc.go
@@ -63,7 +63,7 @@ func tryLoadMlrrc(
 		lineno++
 
 		if err != nil {
-			fmt.Fprintln(os.Stderr, "mlr", err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 			return false
 		}
diff --git a/pkg/climain/mlrcli_parse.go b/pkg/climain/mlrcli_parse.go
index 68ba5abea..ada3e250f 100644
--- a/pkg/climain/mlrcli_parse.go
+++ b/pkg/climain/mlrcli_parse.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Miller main command-line parsing.
 //
 // Before Miller 6 the ordering was:
@@ -66,7 +65,6 @@
 // foo.csv' the '--csv' looks like it belongs to the 'head' verb. When people
 // use '#!/bin/sh' scripts they need to insert the '--' in 'mlr head -n 10 --
 // --csv foo.csv'; for 'mlr -s' we insert the '--' for them.
-// ================================================================
 
 package climain
 
@@ -89,7 +87,7 @@ func ParseCommandLine(
 	args []string,
 ) (
 	options *cli.TOptions,
-	recordTransformers []transformers.IRecordTransformer,
+	recordTransformers []transformers.RecordTransformer,
 	err error,
 ) {
 	// mlr -s scriptfile {data-file names ...} means take the contents of
@@ -125,10 +123,10 @@ func parseCommandLinePassOne(
 	verbSequences [][]string,
 	dataFileNames []string,
 ) {
-	flagSequences = make([][]string, 0)
+	flagSequences = [][]string{}
 	terminalSequence = nil
-	verbSequences = make([][]string, 0)
-	dataFileNames = make([]string, 0)
+	verbSequences = [][]string{}
+	dataFileNames = []string{}
 
 	// All verbs after the first must be preceded with "then"
 	onFirst := true
@@ -255,7 +253,7 @@ func parseCommandLinePassTwo(
 	dataFileNames []string,
 ) (
 	options *cli.TOptions,
-	recordTransformers []transformers.IRecordTransformer,
+	recordTransformers []transformers.RecordTransformer,
 	err error,
 ) {
 	// Options take in-code defaults, then overridden by .mlrrc (if any and if
@@ -275,8 +273,7 @@ func parseCommandLinePassTwo(
 		options.WriterOptions.FailOnDataError = true
 	}
 
-	recordTransformers = make([]transformers.IRecordTransformer, 0)
-	err = nil
+	recordTransformers = []transformers.RecordTransformer{}
 	ignoresInput := false
 
 	// Load a .mlrrc file unless --norc was a main-flag on the command line.
diff --git a/pkg/climain/mlrcli_shebang.go b/pkg/climain/mlrcli_shebang.go
index cfcab1b39..7e0947fea 100644
--- a/pkg/climain/mlrcli_shebang.go
+++ b/pkg/climain/mlrcli_shebang.go
@@ -39,7 +39,7 @@ func maybeInterpolateDashS(args []string) ([]string, error) {
 		return args, nil
 	}
 	if len(args) < 3 {
-		return nil, fmt.Errorf("mlr: -s flag requires a filename after it")
+		return nil, fmt.Errorf("-s flag requires a filename after it")
 	}
 
 	// mlr -s scriptfile input1.csv input2.csv
@@ -51,7 +51,7 @@ func maybeInterpolateDashS(args []string) ([]string, error) {
 	// Read the bytes in the filename given after -s.
 	byteContents, rerr := os.ReadFile(filename)
 	if rerr != nil {
-		return nil, fmt.Errorf("mlr: cannot read %s: %v", filename, rerr)
+		return nil, fmt.Errorf("cannot read %s: %v", filename, rerr)
 	}
 	contents := string(byteContents)
 
@@ -78,7 +78,7 @@ func maybeInterpolateDashS(args []string) ([]string, error) {
 	contents = strings.Join(lines, "\n")
 	argsFromFile, err := shellquote.Split(contents)
 	if err != nil {
-		return nil, fmt.Errorf("mlr: cannot parse %s: %v", filename, err)
+		return nil, fmt.Errorf("cannot parse %s: %v", filename, err)
 	}
 
 	// Join "mlr", the args from the script-file contents, and all the remaining arguments
diff --git a/pkg/colorizer/colorizer.go b/pkg/colorizer/colorizer.go
index cd012cffa..facaf53da 100644
--- a/pkg/colorizer/colorizer.go
+++ b/pkg/colorizer/colorizer.go
@@ -1,10 +1,8 @@
-// ================================================================
 // Output-coloring for Miller
 //
 // Please see mlr --usage-output-colorization for context.
 //
 // Note: code-share with github.com/johnkerl/lumin.
-// ================================================================
 
 package colorizer
 
@@ -15,7 +13,6 @@ import (
 	"github.com/mattn/go-isatty"
 )
 
-// ================================================================
 // External API
 
 // Enum-ish type for when to apply output-coloring
@@ -124,22 +121,19 @@ func ListColorNames() {
 	lumin.ListColorNames()
 }
 
-// ================================================================
 // Internal implementation
 
 func maybeColorize(text string, colorString string, outputIsStdout bool) string {
 	if outputIsStdout && stdoutIsATTY {
 		if colorization == ColorizeOutputNever {
 			return text
-		} else {
-			return colorize(text, colorString)
 		}
+		return colorize(text, colorString)
+	}
+	if colorization == ColorizeOutputAlways {
+		return colorize(text, colorString)
 	} else {
-		if colorization == ColorizeOutputAlways {
-			return colorize(text, colorString)
-		} else {
-			return text
-		}
+		return text
 	}
 }
 
@@ -152,27 +146,23 @@ func GetColorization(outputIsStdout bool, isKey bool) (string, string) {
 	if outputIsStdout && stdoutIsATTY {
 		if colorization == ColorizeOutputNever {
 			return "", ""
+		}
+		if isKey {
+			return keyColorString, defaultColorString
 		} else {
-			if isKey {
-				return keyColorString, defaultColorString
-			} else {
-				return valueColorString, defaultColorString
-			}
+			return valueColorString, defaultColorString
 		}
 	} else {
 		if colorization == ColorizeOutputAlways {
 			if isKey {
 				return keyColorString, defaultColorString
-			} else {
-				return valueColorString, defaultColorString
 			}
-		} else {
-			return "", ""
+			return valueColorString, defaultColorString
 		}
+		return "", ""
 	}
 }
 
-// ================================================================
 // Internal implementation
 
 // Default ANSI color codes
diff --git a/pkg/dsl/ast_build.go b/pkg/dsl/ast_build.go
index 58f8e2032..c25a3e8a2 100644
--- a/pkg/dsl/ast_build.go
+++ b/pkg/dsl/ast_build.go
@@ -1,7 +1,5 @@
-// ================================================================
 // AST-build methods, for use by callbacks within the GOCC/BNF Miller
 // DSL grammar in mlr.bnf.
-// ================================================================
 
 package dsl
 
@@ -182,9 +180,8 @@ func (node *ASTNode) CheckArity(
 ) error {
 	if len(node.Children) != arity {
 		return fmt.Errorf("expected AST node arity %d, got %d", arity, len(node.Children))
-	} else {
-		return nil
 	}
+	return nil
 }
 
 // Tokens are produced by GOCC. However there is an exception: for the ternary
diff --git a/pkg/dsl/ast_print.go b/pkg/dsl/ast_print.go
index c735ef84c..5a327a203 100644
--- a/pkg/dsl/ast_print.go
+++ b/pkg/dsl/ast_print.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Print routines for AST and ASTNode
-// ================================================================
 
 package dsl
 
@@ -9,7 +7,6 @@ import (
 	"strings"
 )
 
-// ================================================================
 // Print is indent-style multiline print.
 // Example, given parse of '$y = 2 * $x + 1':
 //
@@ -52,8 +49,6 @@ func (ast *AST) PrintParexOneLine() {
 	ast.RootNode.PrintParexOneLine()
 }
 
-// ================================================================
-
 // Print is indent-style multiline print.
 func (node *ASTNode) Print() {
 	node.printAux(0)
@@ -80,8 +75,6 @@ func (node *ASTNode) printAux(depth int) {
 	}
 }
 
-// ----------------------------------------------------------------
-
 // PrintParex is parenthesized-expression print.
 func (node *ASTNode) PrintParex() {
 	node.printParexAux(0)
@@ -130,8 +123,6 @@ func (node *ASTNode) printParexAux(depth int) {
 	}
 }
 
-// ----------------------------------------------------------------
-
 // PrintParexOneLine is parenthesized-expression print, all on one line.
 func (node *ASTNode) PrintParexOneLine() {
 	node.printParexOneLineAux()
@@ -153,8 +144,6 @@ func (node *ASTNode) printParexOneLineAux() {
 	}
 }
 
-// ----------------------------------------------------------------
-
 // IsLeaf determines if an AST node is a leaf node.
 func (node *ASTNode) IsLeaf() bool {
 	return len(node.Children) == 0
@@ -170,8 +159,6 @@ func (node *ASTNode) ChildrenAreAllLeaves() bool {
 	return true
 }
 
-// ----------------------------------------------------------------
-
 // Text makes a human-readable, whitespace-free name for an AST node. Some
 // nodes have non-nil tokens; other, nil. And token-types can have spaces in
 // them. In this method we use custom mappings to always get a whitespace-free
diff --git a/pkg/dsl/ast_types.go b/pkg/dsl/ast_types.go
index 3ea32c4d3..f58f71e0c 100644
--- a/pkg/dsl/ast_types.go
+++ b/pkg/dsl/ast_types.go
@@ -1,6 +1,4 @@
-// ================================================================
 // AST and ASTNode data structures for the Miller DSL parser
-// ================================================================
 
 package dsl
 
diff --git a/pkg/dsl/cst/assignments.go b/pkg/dsl/cst/assignments.go
index de3ff697b..7bd56d7a7 100644
--- a/pkg/dsl/cst/assignments.go
+++ b/pkg/dsl/cst/assignments.go
@@ -1,6 +1,4 @@
-// ================================================================
 // CST build/execute for assignment and unset statements.
-// ================================================================
 
 package cst
 
diff --git a/pkg/dsl/cst/block_exit.go b/pkg/dsl/cst/block_exit.go
index 40fe4b89a..87693144a 100644
--- a/pkg/dsl/cst/block_exit.go
+++ b/pkg/dsl/cst/block_exit.go
@@ -1,7 +1,5 @@
-// ================================================================
 // This is for things that get us out of statement blocks: break, continue,
 // return.
-// ================================================================
 
 package cst
 
@@ -64,9 +62,8 @@ func (root *RootNode) BuildReturnNode(astNode *dsl.ASTNode) (*ReturnNode, error)
 			return nil, err
 		}
 		return &ReturnNode{returnValueExpression: returnValueExpression}, nil
-	} else {
-		lib.InternalCodingErrorIf(true)
 	}
+	lib.InternalCodingErrorIf(true)
 	return nil, fmt.Errorf("internal coding error: statement should not be reached")
 }
 
diff --git a/pkg/dsl/cst/blocks.go b/pkg/dsl/cst/blocks.go
index cbc69fb17..7b47187a3 100644
--- a/pkg/dsl/cst/blocks.go
+++ b/pkg/dsl/cst/blocks.go
@@ -1,7 +1,5 @@
-// ================================================================
 // This is for begin and end blocks, but not the main block which is direct
 // from the CST root.
-// ================================================================
 
 package cst
 
@@ -13,7 +11,7 @@ import (
 
 func NewStatementBlockNode() *StatementBlockNode {
 	return &StatementBlockNode{
-		executables: make([]IExecutable, 0),
+		executables: []IExecutable{},
 	}
 }
 
@@ -64,9 +62,8 @@ func (root *RootNode) BuildStatementBlockNodeFromBeginOrEnd(
 	statementBlockNode, err := root.BuildStatementBlockNode(astStatementBlockNode)
 	if err != nil {
 		return nil, err
-	} else {
-		return statementBlockNode, nil
 	}
+	return statementBlockNode, nil
 }
 
 func (root *RootNode) BuildStatementBlockNode(
@@ -105,7 +102,6 @@ func (node *StatementBlockNode) Execute(state *runtime.State) (*BlockExitPayload
 	return nil, nil
 }
 
-// ----------------------------------------------------------------
 // Assumes the caller has wrapped PushStackFrame() / PopStackFrame().  That
 // could be done here, but is instead done in the caller to simplify the
 // binding of for-loop variables. In particular, in
diff --git a/pkg/dsl/cst/builtin_function_manager.go b/pkg/dsl/cst/builtin_function_manager.go
index b478af88e..a75fca274 100644
--- a/pkg/dsl/cst/builtin_function_manager.go
+++ b/pkg/dsl/cst/builtin_function_manager.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Adding a new builtin function:
 // * New entry in makeBuiltinFunctionLookupTable
 // * Implement the function in mlrval_functions.go
@@ -8,7 +7,6 @@
 // from Go naming conventions: it makes it easier to mentally pair up
 // Miller-DSL functions with their Go implementations. Please preserve this
 // naming convention.
-// ================================================================
 
 package cst
 
@@ -65,7 +63,6 @@ type BuiltinFunctionInfo struct {
 	variadicFuncWithState  VariadicFuncWithState       // sort
 }
 
-
 func isLetter(c byte) bool {
 	return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')
 }
@@ -73,9 +70,8 @@ func isLetter(c byte) bool {
 func startsWithLetter(s string) bool {
 	if len(s) < 1 {
 		return false
-	} else {
-		return isLetter(s[0])
 	}
+	return isLetter(s[0])
 }
 
 func makeBuiltinFunctionLookupTable() []BuiltinFunctionInfo {
@@ -2525,12 +2521,11 @@ Run a command via executable, path, args and environment, yielding its stdout mi
 			return true
 		} else if !si && sj {
 			return false
+		}
+		if namei < namej {
+			return true
 		} else {
-			if namei < namej {
-				return true
-			} else {
-				return false
-			}
+			return false
 		}
 	})
 
@@ -2554,8 +2549,8 @@ func NewBuiltinFunctionManager() *BuiltinFunctionManager {
 	}
 }
 
-func (manager *BuiltinFunctionManager) LookUp(functionName string) *BuiltinFunctionInfo {
-	return manager.hashTable[functionName]
+func (mgr *BuiltinFunctionManager) LookUp(functionName string) *BuiltinFunctionInfo {
+	return mgr.hashTable[functionName]
 }
 
 func hashifyLookupTable(lookupTable *[]BuiltinFunctionInfo) map[string]*BuiltinFunctionInfo {
@@ -2578,18 +2573,17 @@ func hashifyLookupTable(lookupTable *[]BuiltinFunctionInfo) map[string]*BuiltinF
 	return hashTable
 }
 
-
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionClasses() {
-	classesList := manager.getBuiltinFunctionClasses()
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionClasses() {
+	classesList := mgr.getBuiltinFunctionClasses()
 	for _, class := range classesList {
 		fmt.Println(class)
 	}
 }
 
-func (manager *BuiltinFunctionManager) getBuiltinFunctionClasses() []string {
+func (mgr *BuiltinFunctionManager) getBuiltinFunctionClasses() []string {
 	classesSeen := make(map[string]bool)
-	classesList := make([]string, 0)
-	for _, builtinFunctionInfo := range *manager.lookupTable {
+	classesList := []string{}
+	for _, builtinFunctionInfo := range *mgr.lookupTable {
 		class := string(builtinFunctionInfo.class)
 		if !classesSeen[class] {
 			classesList = append(classesList, class)
@@ -2600,32 +2594,31 @@ func (manager *BuiltinFunctionManager) getBuiltinFunctionClasses() []string {
 	return classesList
 }
 
-
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionsInClass(class string) {
-	for _, builtinFunctionInfo := range *manager.lookupTable {
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionsInClass(class string) {
+	for _, builtinFunctionInfo := range *mgr.lookupTable {
 		if string(builtinFunctionInfo.class) == class {
 			fmt.Println(builtinFunctionInfo.name)
 		}
 	}
 }
 
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionNamesVertically() {
-	for _, builtinFunctionInfo := range *manager.lookupTable {
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionNamesVertically() {
+	for _, builtinFunctionInfo := range *mgr.lookupTable {
 		fmt.Println(builtinFunctionInfo.name)
 	}
 }
 
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionNamesAsParagraph() {
-	functionNames := make([]string, len(*manager.lookupTable))
-	for i, builtinFunctionInfo := range *manager.lookupTable {
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionNamesAsParagraph() {
+	functionNames := make([]string, len(*mgr.lookupTable))
+	for i, builtinFunctionInfo := range *mgr.lookupTable {
 		functionNames[i] = builtinFunctionInfo.name
 	}
 	lib.PrintWordsAsParagraph(functionNames)
 }
 
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionsAsTable() {
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionsAsTable() {
 	fmt.Printf("%-30s %-12s %s\n", "Name", "Class", "Args")
-	for _, builtinFunctionInfo := range *manager.lookupTable {
+	for _, builtinFunctionInfo := range *mgr.lookupTable {
 		fmt.Printf("%-30s %-12s %s\n",
 			builtinFunctionInfo.name,
 			builtinFunctionInfo.class,
@@ -2634,68 +2627,68 @@ func (manager *BuiltinFunctionManager) ListBuiltinFunctionsAsTable() {
 	}
 }
 
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionUsages() {
-	for i, builtinFunctionInfo := range *manager.lookupTable {
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionUsages() {
+	for i, builtinFunctionInfo := range *mgr.lookupTable {
 		if i > 0 {
 			fmt.Println()
 		}
-		manager.showSingleUsage(&builtinFunctionInfo)
+		mgr.showSingleUsage(&builtinFunctionInfo)
 	}
 }
 
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionUsagesByClass() {
-	classesList := manager.getBuiltinFunctionClasses()
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionUsagesByClass() {
+	classesList := mgr.getBuiltinFunctionClasses()
 
 	for _, class := range classesList {
 		fmt.Println()
 		fmt.Println(colorizer.MaybeColorizeHelp(strings.ToUpper(class), true))
 		fmt.Println()
-		for _, builtinFunctionInfo := range *manager.lookupTable {
+		for _, builtinFunctionInfo := range *mgr.lookupTable {
 			if string(builtinFunctionInfo.class) != class {
 				continue
 			}
-			manager.showSingleUsage(&builtinFunctionInfo)
+			mgr.showSingleUsage(&builtinFunctionInfo)
 		}
 	}
 }
 
-func (manager *BuiltinFunctionManager) ListBuiltinFunctionUsage(functionName string) {
-	if !manager.TryListBuiltinFunctionUsage(functionName) {
+func (mgr *BuiltinFunctionManager) ListBuiltinFunctionUsage(functionName string) {
+	if !mgr.TryListBuiltinFunctionUsage(functionName) {
 		fmt.Fprintf(os.Stderr, "Function \"%s\" not found.\n", functionName)
 	}
 }
 
-func (manager *BuiltinFunctionManager) TryListBuiltinFunctionUsage(
+func (mgr *BuiltinFunctionManager) TryListBuiltinFunctionUsage(
 	functionName string,
 ) bool {
-	builtinFunctionInfo := manager.LookUp(functionName)
+	builtinFunctionInfo := mgr.LookUp(functionName)
 	if builtinFunctionInfo == nil {
 		return false
 	}
-	manager.listBuiltinFunctionUsageExact(builtinFunctionInfo)
+	mgr.listBuiltinFunctionUsageExact(builtinFunctionInfo)
 	return true
 }
 
-func (manager *BuiltinFunctionManager) TryListBuiltinFunctionUsageApproximate(
+func (mgr *BuiltinFunctionManager) TryListBuiltinFunctionUsageApproximate(
 	searchString string,
 ) bool {
 	found := false
-	for _, builtinFunctionInfo := range *manager.lookupTable {
+	for _, builtinFunctionInfo := range *mgr.lookupTable {
 		if strings.Contains(builtinFunctionInfo.name, searchString) {
-			manager.showSingleUsage(&builtinFunctionInfo)
+			mgr.showSingleUsage(&builtinFunctionInfo)
 			found = true
 		}
 	}
 	return found
 }
 
-func (manager *BuiltinFunctionManager) listBuiltinFunctionUsageExact(
+func (mgr *BuiltinFunctionManager) listBuiltinFunctionUsageExact(
 	builtinFunctionInfo *BuiltinFunctionInfo,
 ) {
-	manager.showSingleUsage(builtinFunctionInfo)
+	mgr.showSingleUsage(builtinFunctionInfo)
 }
 
-func (manager *BuiltinFunctionManager) showSingleUsage(
+func (mgr *BuiltinFunctionManager) showSingleUsage(
 	builtinFunctionInfo *BuiltinFunctionInfo,
 ) {
 	lib.InternalCodingErrorIf(builtinFunctionInfo.help == "")
@@ -2719,7 +2712,7 @@ func (manager *BuiltinFunctionManager) showSingleUsage(
 
 func describeNargs(info *BuiltinFunctionInfo) string {
 	if info.hasMultipleArities {
-		pieces := make([]string, 0)
+		pieces := []string{}
 		if info.zaryFunc != nil {
 			pieces = append(pieces, "0")
 		}
@@ -2740,37 +2733,36 @@ func describeNargs(info *BuiltinFunctionInfo) string {
 		}
 		return strings.Join(pieces, ",")
 
-	} else {
-		if info.zaryFunc != nil {
-			return "0"
-		}
-		if info.unaryFunc != nil {
-			return "1"
-		}
-		if info.unaryFuncWithContext != nil {
-			return "1"
-		}
-		if info.binaryFunc != nil {
-			return "2"
-		}
-		if info.binaryFuncWithState != nil {
-			return "2"
-		}
-		if info.regexCaptureBinaryFunc != nil {
-			return "2"
-		}
-		if info.ternaryFunc != nil {
-			return "3"
-		}
-		if info.ternaryFuncWithState != nil {
-			return "3"
-		}
-		if info.variadicFunc != nil || info.variadicFuncWithState != nil {
-			if info.maximumVariadicArity != 0 {
-				return fmt.Sprintf("%d-%d", info.minimumVariadicArity, info.maximumVariadicArity)
-			} else {
-				return "variadic"
-			}
+	}
+	if info.zaryFunc != nil {
+		return "0"
+	}
+	if info.unaryFunc != nil {
+		return "1"
+	}
+	if info.unaryFuncWithContext != nil {
+		return "1"
+	}
+	if info.binaryFunc != nil {
+		return "2"
+	}
+	if info.binaryFuncWithState != nil {
+		return "2"
+	}
+	if info.regexCaptureBinaryFunc != nil {
+		return "2"
+	}
+	if info.ternaryFunc != nil {
+		return "3"
+	}
+	if info.ternaryFuncWithState != nil {
+		return "3"
+	}
+	if info.variadicFunc != nil || info.variadicFuncWithState != nil {
+		if info.maximumVariadicArity != 0 {
+			return fmt.Sprintf("%d-%d", info.minimumVariadicArity, info.maximumVariadicArity)
+		} else {
+			return "variadic"
 		}
 	}
 	lib.InternalCodingErrorIf(true)
@@ -2789,7 +2781,6 @@ func (info *BuiltinFunctionInfo) JoinHelp() string {
 	return multiSpaceRegex.ReplaceAllString(strings.ReplaceAll(info.help, "\n", " "), " ")
 }
 
-// ================================================================
 // This is a singleton so the online-help functions can query it for listings,
 // online help, etc.
 var BuiltinFunctionManagerInstance *BuiltinFunctionManager = NewBuiltinFunctionManager()
diff --git a/pkg/dsl/cst/builtin_functions.go b/pkg/dsl/cst/builtin_functions.go
index 736d0a0f8..fa680a687 100644
--- a/pkg/dsl/cst/builtin_functions.go
+++ b/pkg/dsl/cst/builtin_functions.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Methods for built-in functions
-// ================================================================
 
 package cst
 
@@ -51,12 +49,11 @@ func (root *RootNode) BuildBuiltinFunctionCallsiteNode(
 			return root.BuildVariadicFunctionCallsiteNode(astNode, builtinFunctionInfo)
 		} else if builtinFunctionInfo.variadicFuncWithState != nil {
 			return root.BuildVariadicFunctionWithStateCallsiteNode(astNode, builtinFunctionInfo)
-		} else {
-			return nil, fmt.Errorf(
-				"at CST BuildFunctionCallsiteNode: builtin function not implemented yet: %s",
-				functionName,
-			)
 		}
+		return nil, fmt.Errorf(
+			"at CST BuildFunctionCallsiteNode: builtin function not implemented yet: %s",
+			functionName,
+		)
 	}
 
 	return nil, nil // not found
@@ -95,7 +92,7 @@ func BuildZaryFunctionCallsiteNode(
 	expectedArity := 0
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -127,7 +124,7 @@ func (root *RootNode) BuildUnaryFunctionCallsiteNode(
 	expectedArity := 1
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -165,7 +162,7 @@ func (root *RootNode) BuildUnaryFunctionWithContextCallsiteNode(
 	expectedArity := 1
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -204,7 +201,7 @@ func (root *RootNode) BuildBinaryFunctionCallsiteNode(
 	expectedArity := 2
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -277,7 +274,7 @@ func (root *RootNode) BuildBinaryFunctionWithStateCallsiteNode(
 	expectedArity := 2
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -326,7 +323,7 @@ func (root *RootNode) BuildTernaryFunctionWithStateCallsiteNode(
 	expectedArity := 3
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -366,7 +363,6 @@ func (node *TernaryFunctionWithStateCallsiteNode) Evaluate(
 	)
 }
 
-// ----------------------------------------------------------------
 // RegexCaptureBinaryFunctionCallsiteNode special-cases the =~ and !=~
 // operators which set the CST State object's captures array for "\1".."\9".
 // This is identical to BinaryFunctionCallsite except that
@@ -412,7 +408,7 @@ func (root *RootNode) BuildRegexCaptureBinaryFunctionCallsiteNode(
 	expectedArity := 2
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -447,7 +443,6 @@ func (node *RegexCaptureBinaryFunctionCallsiteNode) Evaluate(
 	return output
 }
 
-// ----------------------------------------------------------------
 // DotCallsiteNode special-cases the dot operator, which is:
 // * string + string, with coercion to string if either side is int/float/bool/etc.
 // * map attribute access, if the left-hand side is a map.
@@ -464,7 +459,7 @@ func (root *RootNode) BuildDotCallsiteNode(
 	expectedArity := 2
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			".",
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -501,14 +496,12 @@ func (node *DotCallsiteNode) Evaluate(
 		value2 := mapvalue1.Get(node.string2)
 		if value2 == nil {
 			return mlrval.ABSENT.StrictModeCheck(state.StrictMode, "map access ["+node.string2+"]")
-		} else {
-			return value2
 		}
-	} else {
-		// Case 2: string concatenation
-		value2 := node.evaluable2.Evaluate(state)
-		return bifs.BIF_dot(value1, value2)
+		return value2
 	}
+	// Case 2: string concatenation
+	value2 := node.evaluable2.Evaluate(state)
+	return bifs.BIF_dot(value1, value2)
 }
 
 type TernaryFunctionCallsiteNode struct {
@@ -526,7 +519,7 @@ func (root *RootNode) BuildTernaryFunctionCallsiteNode(
 	expectedArity := 3
 	if callsiteArity != expectedArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			builtinFunctionInfo.name,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -590,7 +583,7 @@ func (root *RootNode) BuildVariadicFunctionCallsiteNode(
 
 	if callsiteArity < builtinFunctionInfo.minimumVariadicArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s takes minimum argument count %d; got %d",
+			"function %s takes minimum argument count %d; got %d",
 			builtinFunctionInfo.name,
 			builtinFunctionInfo.minimumVariadicArity,
 			callsiteArity,
@@ -600,7 +593,7 @@ func (root *RootNode) BuildVariadicFunctionCallsiteNode(
 	if builtinFunctionInfo.maximumVariadicArity != 0 {
 		if callsiteArity > builtinFunctionInfo.maximumVariadicArity {
 			return nil, fmt.Errorf(
-				"mlr: function %s takes maximum argument count %d; got %d",
+				"function %s takes maximum argument count %d; got %d",
 				builtinFunctionInfo.name,
 				builtinFunctionInfo.maximumVariadicArity,
 				callsiteArity,
@@ -608,7 +601,7 @@ func (root *RootNode) BuildVariadicFunctionCallsiteNode(
 		}
 	}
 
-	var err error = nil
+	var err error
 	for i, astChildNode := range astNode.Children {
 		evaluables[i], err = root.BuildEvaluableNode(astChildNode)
 		if err != nil {
@@ -647,7 +640,7 @@ func (root *RootNode) BuildVariadicFunctionWithStateCallsiteNode(
 
 	if callsiteArity < builtinFunctionInfo.minimumVariadicArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s takes minimum argument count %d; got %d",
+			"function %s takes minimum argument count %d; got %d",
 			builtinFunctionInfo.name,
 			builtinFunctionInfo.minimumVariadicArity,
 			callsiteArity,
@@ -657,7 +650,7 @@ func (root *RootNode) BuildVariadicFunctionWithStateCallsiteNode(
 	if builtinFunctionInfo.maximumVariadicArity != 0 {
 		if callsiteArity > builtinFunctionInfo.maximumVariadicArity {
 			return nil, fmt.Errorf(
-				"mlr: function %s takes maximum argument count %d; got %d",
+				"function %s takes maximum argument count %d; got %d",
 				builtinFunctionInfo.name,
 				builtinFunctionInfo.maximumVariadicArity,
 				callsiteArity,
@@ -665,7 +658,7 @@ func (root *RootNode) BuildVariadicFunctionWithStateCallsiteNode(
 		}
 	}
 
-	var err error = nil
+	var err error
 	for i, astChildNode := range astNode.Children {
 		evaluables[i], err = root.BuildEvaluableNode(astChildNode)
 		if err != nil {
@@ -869,7 +862,6 @@ func (node *LogicalOROperatorNode) Evaluate(
 	return bifs.BIF_logical_OR(aout, bout)
 }
 
-// ================================================================
 // a ?? b evaluates to b only when a is absent. Example: '$foo ?? 0' when the
 // current record has no field $foo.
 type AbsentCoalesceOperatorNode struct{ a, b IEvaluable }
@@ -892,7 +884,6 @@ func (node *AbsentCoalesceOperatorNode) Evaluate(
 	return node.b.Evaluate(state)
 }
 
-// ================================================================
 // a ?? b evaluates to b only when a is absent or empty. Example: '$foo ?? 0'
 // when the current record has no field $foo, or when $foo is empty..
 type EmptyCoalesceOperatorNode struct{ a, b IEvaluable }
@@ -911,9 +902,8 @@ func (node *EmptyCoalesceOperatorNode) Evaluate(
 	atype := aout.Type()
 	if atype == mlrval.MT_ABSENT || atype == mlrval.MT_VOID || (atype == mlrval.MT_STRING && aout.String() == "") {
 		return node.b.Evaluate(state)
-	} else {
-		return aout
 	}
+	return aout
 }
 
 type StandardTernaryOperatorNode struct{ a, b, c IEvaluable }
@@ -934,12 +924,10 @@ func (node *StandardTernaryOperatorNode) Evaluate(
 	// Short-circuit: defer evaluation unless needed
 	if boolValue {
 		return node.b.Evaluate(state)
-	} else {
-		return node.c.Evaluate(state)
 	}
+	return node.c.Evaluate(state)
 }
 
-// ================================================================
 // The function-manager logic is designed to make it easy to implement a large
 // number of functions/operators with a small number of keystrokes. The general
 // paradigm is evaluate the arguments, then invoke the function/operator.
diff --git a/pkg/dsl/cst/collections.go b/pkg/dsl/cst/collections.go
index e31209973..3ca746db5 100644
--- a/pkg/dsl/cst/collections.go
+++ b/pkg/dsl/cst/collections.go
@@ -1,7 +1,5 @@
-// ================================================================
 // CST build/execute for AST array-literal, map-literal, index-access, and
 // slice-access nodes
-// ================================================================
 
 package cst
 
@@ -125,15 +123,14 @@ func (node *ArrayOrMapIndexAccessNode) Evaluate(
 	} else if baseMlrval.IsAbsent() {
 		// For strict mode, absence should be detected on the baseMlrval and indexMlrval evaluators.
 		return mlrval.ABSENT
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(
-				"cannot index base value %s of type %s, which is not array, map, or string",
-				baseMlrval.StringMaybeQuoted(),
-				baseMlrval.GetTypeName(),
-			),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(
+			"cannot index base value %s of type %s, which is not array, map, or string",
+			baseMlrval.StringMaybeQuoted(),
+			baseMlrval.GetTypeName(),
+		),
+	)
 }
 
 type ArraySliceAccessNode struct {
@@ -225,7 +222,6 @@ func (node *ArraySliceAccessNode) Evaluate(
 	return mlrval.FromArray(retval)
 }
 
-// ================================================================
 // For input record 'a=7,b=8,c=9',  $[[2]] = "b"
 
 type PositionalFieldNameNode struct {
@@ -272,7 +268,6 @@ func (node *PositionalFieldNameNode) Evaluate(
 	return mlrval.FromString(name)
 }
 
-// ================================================================
 // For input record 'a=7,b=8,c=9',  $[[2]] = 8
 
 type PositionalFieldValueNode struct {
@@ -318,7 +313,6 @@ func (node *PositionalFieldValueNode) Evaluate(
 	return retval
 }
 
-// ================================================================
 // For x = [7,8,9], x[[2]] = 2
 // For y = {"a":7,"b":8,"c":9}, y[[2]] = "b"
 type ArrayOrMapPositionalNameAccessNode struct {
@@ -371,34 +365,30 @@ func (node *ArrayOrMapPositionalNameAccessNode) Evaluate(
 		zindex, ok := mlrval.UnaliasArrayLengthIndex(int(n), int(index))
 		if ok {
 			return mlrval.FromInt(int64(zindex + 1)) // Miller user-space indices are 1-up
-		} else {
-			return mlrval.ABSENT
 		}
+		return mlrval.ABSENT
 
 	} else if baseMlrval.IsMap() {
 		name, ok := baseMlrval.GetMap().GetNameAtPositionalIndex(index)
 		if !ok {
 			return mlrval.ABSENT
-		} else {
-			return mlrval.FromString(name)
 		}
+		return mlrval.FromString(name)
 
 	} else if baseMlrval.IsAbsent() {
 		// For strict mode, absence should be detected on the baseMlrval and indexMlrval evaluators.
 		return mlrval.ABSENT
 
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(
-				"cannot index base value %s of type %s, which is not array, map, or string",
-				baseMlrval.StringMaybeQuoted(),
-				baseMlrval.GetTypeName(),
-			),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(
+			"cannot index base value %s of type %s, which is not array, map, or string",
+			baseMlrval.StringMaybeQuoted(),
+			baseMlrval.GetTypeName(),
+		),
+	)
 }
 
-// ================================================================
 // For x = [7,8,9], x[[2]] = 8
 // For y = {"a":7,"b":8,"c":9}, y[[2]] = 8
 type ArrayOrMapPositionalValueAccessNode struct {
@@ -464,18 +454,16 @@ func (node *ArrayOrMapPositionalValueAccessNode) Evaluate(
 		// For strict mode, absence should be detected on the baseMlrval and indexMlrval evaluators.
 		return mlrval.ABSENT
 
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(
-				"cannot index base value %s of type %s, which is not array, map, or string",
-				baseMlrval.StringMaybeQuoted(),
-				baseMlrval.GetTypeName(),
-			),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(
+			"cannot index base value %s of type %s, which is not array, map, or string",
+			baseMlrval.StringMaybeQuoted(),
+			baseMlrval.GetTypeName(),
+		),
+	)
 }
 
-// ================================================================
 // This is for computing map entries at runtime. For example, in
 //
 //   mlr put 'mymap = {"sum": $x + $y, "diff": $x - $y}; ...'
diff --git a/pkg/dsl/cst/cond.go b/pkg/dsl/cst/cond.go
index e505054c5..54b4e95c9 100644
--- a/pkg/dsl/cst/cond.go
+++ b/pkg/dsl/cst/cond.go
@@ -1,7 +1,5 @@
-// ================================================================
 // This is for awkish pattern-action-blocks, like mlr put 'NR > 10 { ... }'.
 // Just shorthand for if-statements without elif/else.
-// ================================================================
 
 package cst
 
@@ -21,7 +19,6 @@ type CondBlockNode struct {
 	statementBlockNode *StatementBlockNode
 }
 
-// ----------------------------------------------------------------
 // Sample AST:
 
 func (root *RootNode) BuildCondBlockNode(astNode *dsl.ASTNode) (*CondBlockNode, error) {
@@ -60,7 +57,7 @@ func (node *CondBlockNode) Execute(
 		boolValue = false
 	} else if !isBool {
 		return nil, fmt.Errorf(
-			"mlr: conditional expression did not evaluate to boolean%s",
+			"conditional expression did not evaluate to boolean%s",
 			dsl.TokenToLocationInfo(node.conditionToken),
 		)
 	}
diff --git a/pkg/dsl/cst/dump.go b/pkg/dsl/cst/dump.go
index c71611fed..9a4cc8bbe 100644
--- a/pkg/dsl/cst/dump.go
+++ b/pkg/dsl/cst/dump.go
@@ -1,4 +1,3 @@
-// ================================================================
 // This handles dump and edump statements.
 // See print.go for comments; this is similar.
 //
@@ -11,7 +10,6 @@
 //
 // * 'print $x,$y,$z' prints all items on one line; 'dump $x,$y,$z' prints each on
 //   its own line.
-// ================================================================
 
 package cst
 
@@ -56,7 +54,6 @@ func (root *RootNode) BuildEdumpStatementNode(astNode *dsl.ASTNode) (IExecutable
 	)
 }
 
-// ----------------------------------------------------------------
 // Common code for building dump/edump nodes
 
 func (root *RootNode) buildDumpxStatementNode(
@@ -114,7 +111,7 @@ func (root *RootNode) buildDumpxStatementNode(
 		lib.InternalCodingErrorIf(redirectorNode.Children == nil)
 		lib.InternalCodingErrorIf(len(redirectorNode.Children) != 1)
 		redirectorTargetNode := redirectorNode.Children[0]
-		var err error = nil
+		var err error
 
 		if redirectorTargetNode.Type == dsl.NodeTypeRedirectTargetStdout {
 			retval.dumpToRedirectFunc = retval.dumpToStdout
@@ -135,7 +132,7 @@ func (root *RootNode) buildDumpxStatementNode(
 			} else if redirectorNode.Type == dsl.NodeTypeRedirectPipe {
 				retval.outputHandlerManager = output.NewPipeWriteHandlerManager(root.recordWriterOptions)
 			} else {
-				return nil, fmt.Errorf("mlr: unhandled redirector node type %s", string(redirectorNode.Type))
+				return nil, fmt.Errorf("unhandled redirector node type %s", string(redirectorNode.Type))
 			}
 		}
 	}
@@ -205,7 +202,7 @@ func (node *DumpStatementNode) dumpToFileOrPipe(
 	redirectorTarget := node.redirectorTargetEvaluable.Evaluate(state)
 	if !redirectorTarget.IsString() {
 		return fmt.Errorf(
-			"mlr: output redirection yielded %s, not string",
+			"output redirection yielded %s, not string",
 			redirectorTarget.GetTypeName(),
 		)
 	}
diff --git a/pkg/dsl/cst/emit1.go b/pkg/dsl/cst/emit1.go
index af8e4fb60..098fcc590 100644
--- a/pkg/dsl/cst/emit1.go
+++ b/pkg/dsl/cst/emit1.go
@@ -1,4 +1,3 @@
-// ================================================================
 // The other emit variants (emit, emitp, emitf) need to take only oosvars, etc.
 // -- not arbitrary expressions which *evaluate* to map. Emit1, by contrast,
 // takes any expression which evaluates to a map. So you can do 'emit1
@@ -15,7 +14,6 @@
 // So, we have emit/emitp which permit grammatical complexity in the
 // lashing/indexing/redirection, and emit1 which permits grammatical complexity
 // in the emittable.
-// ================================================================
 
 package cst
 
diff --git a/pkg/dsl/cst/emit_emitp.go b/pkg/dsl/cst/emit_emitp.go
index 12a70a1ff..9031c8942 100644
--- a/pkg/dsl/cst/emit_emitp.go
+++ b/pkg/dsl/cst/emit_emitp.go
@@ -1,4 +1,3 @@
-// ================================================================
 // This handles emit and emitp statements. These produce new records (in
 // addition to the current record, $*) into the output record stream.
 //
@@ -34,7 +33,6 @@
 // The third complexlity here is whether we have the '"x", "y"' after the
 // emittables. These control how nested maps are used to generate multiple
 // records (via implicit looping).
-// ================================================================
 
 package cst
 
@@ -50,7 +48,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ================================================================
 // Shared by emit and emitp
 
 type tEmitToRedirectFunc func(
@@ -106,7 +103,6 @@ func (root *RootNode) BuildEmitPStatementNode(astNode *dsl.ASTNode) (IExecutable
 	return root.buildEmitXStatementNode(astNode, true)
 }
 
-
 var EMITX_NAMED_NODE_TYPES = map[dsl.TNodeType]bool{
 	dsl.NodeTypeLocalVariable:       true,
 	dsl.NodeTypeDirectOosvarValue:   true,
@@ -121,7 +117,6 @@ var EMITX_NAMELESS_NODE_TYPES = map[dsl.TNodeType]bool{
 	dsl.NodeTypeMapLiteral: true,
 }
 
-// ----------------------------------------------------------------
 // EMIT AND EMITP
 
 func (root *RootNode) buildEmitXStatementNode(
@@ -170,7 +165,7 @@ func (root *RootNode) buildEmitXStatementNode(
 
 		} else {
 			return nil, fmt.Errorf(
-				"mlr: unlashed-emit node types must be local variables, field names, oosvars, or maps; got %s",
+				"unlashed-emit node types must be local variables, field names, oosvars, or maps; got %s",
 				childNode.Type,
 			)
 		}
@@ -180,7 +175,7 @@ func (root *RootNode) buildEmitXStatementNode(
 		for _, childNode := range emittablesNode.Children {
 			if !EMITX_NAMED_NODE_TYPES[childNode.Type] {
 				return nil, fmt.Errorf(
-					"mlr: lashed-emit node types must be local variables, field names, or oosvars; got %s",
+					"lashed-emit node types must be local variables, field names, or oosvars; got %s",
 					childNode.Type,
 				)
 			}
@@ -245,7 +240,7 @@ func (root *RootNode) buildEmitXStatementNode(
 		lib.InternalCodingErrorIf(redirectorNode.Children == nil)
 		lib.InternalCodingErrorIf(len(redirectorNode.Children) != 1)
 		redirectorTargetNode := redirectorNode.Children[0]
-		var err error = nil
+		var err error
 
 		if redirectorTargetNode.Type == dsl.NodeTypeRedirectTargetStdout {
 			retval.emitToRedirectFunc = retval.emitRecordToFileOrPipe
@@ -270,7 +265,7 @@ func (root *RootNode) buildEmitXStatementNode(
 			} else if redirectorNode.Type == dsl.NodeTypeRedirectPipe {
 				retval.outputHandlerManager = output.NewPipeWriteHandlerManager(root.recordWriterOptions)
 			} else {
-				return nil, fmt.Errorf("mlr: unhandled redirector node type %s", string(redirectorNode.Type))
+				return nil, fmt.Errorf("unhandled redirector node type %s", string(redirectorNode.Type))
 			}
 		}
 	}
@@ -294,32 +289,30 @@ func (node *EmitXStatementNode) Execute(state *runtime.State) (*BlockExitPayload
 		}
 		return nil, node.executorFunc(names, values, state)
 
-	} else {
-		// 'emit @*', 'emit {...}', etc.
-		parentValue := node.topLevelEvaluableMap.Evaluate(state)
-		parentMapValue := parentValue.GetMap()
-		if parentMapValue == nil {
-			// TODO: what else to do if the should-be-a-map evaluates to:
-			// * absent -- clearly returning is the right thing
-			// * error -- what to emit?
-			// * anything else other than a map -- ?
-			return nil, nil
-		}
-		names := make([]string, parentMapValue.FieldCount)
-		values := make([]*mlrval.Mlrval, parentMapValue.FieldCount)
-
-		i := 0
-		for pe := parentMapValue.Head; pe != nil; pe = pe.Next {
-			names[i] = pe.Key
-			values[i] = pe.Value
-			i++
-		}
-
-		return nil, node.executorFunc(names, values, state)
 	}
+	// 'emit @*', 'emit {...}', etc.
+	parentValue := node.topLevelEvaluableMap.Evaluate(state)
+	parentMapValue := parentValue.GetMap()
+	if parentMapValue == nil {
+		// TODO: what else to do if the should-be-a-map evaluates to:
+		// * absent -- clearly returning is the right thing
+		// * error -- what to emit?
+		// * anything else other than a map -- ?
+		return nil, nil
+	}
+	names := make([]string, parentMapValue.FieldCount)
+	values := make([]*mlrval.Mlrval, parentMapValue.FieldCount)
+
+	i := 0
+	for pe := parentMapValue.Head; pe != nil; pe = pe.Next {
+		names[i] = pe.Key
+		values[i] = pe.Value
+		i++
+	}
+
+	return nil, node.executorFunc(names, values, state)
 }
 
-// ----------------------------------------------------------------
 // emit @* (supposing @a and @b exist) means @a and @b material are
 // emitted in separate records.
 //
@@ -382,8 +375,8 @@ func (node *EmitXStatementNode) executeNonIndexedNonLashedEmit(
 				}
 
 			} else { // recurse
-				nextLevelNames := make([]string, 0)
-				nextLevelValues := make([]*mlrval.Mlrval, 0)
+				nextLevelNames := []string{}
+				nextLevelValues := []*mlrval.Mlrval{}
 				for pe := value.GetMap().Head; pe != nil; pe = pe.Next {
 					nextLevelNames = append(nextLevelNames, pe.Key)
 					nextLevelValues = append(nextLevelValues, pe.Value.Copy())
@@ -416,7 +409,6 @@ func (node *EmitXStatementNode) executeNonIndexedNonLashedEmitP(
 	return nil
 }
 
-// ----------------------------------------------------------------
 // emit (@a, $b) means @a and @b material are lashed together in the
 // same record.
 
@@ -442,48 +434,47 @@ func (node *EmitXStatementNode) executeNonIndexedLashedEmit(
 		}
 		return node.emitToRedirectFunc(newrec, state)
 
-	} else {
-		for i, value := range values {
-			if value.IsAbsent() {
-				continue
+	}
+	for i, value := range values {
+		if value.IsAbsent() {
+			continue
+		}
+
+		valueAsMap := value.GetMap() // nil if not a map
+
+		if valueAsMap == nil {
+			newrec := mlrval.NewMlrmapAsRecord()
+			newrec.PutCopy(names[i], value)
+			err := node.emitToRedirectFunc(newrec, state)
+			if err != nil {
+				return err
 			}
 
-			valueAsMap := value.GetMap() // nil if not a map
-
-			if valueAsMap == nil {
+		} else {
+			recurse := valueAsMap.IsNested()
+			if !recurse {
 				newrec := mlrval.NewMlrmapAsRecord()
-				newrec.PutCopy(names[i], value)
+				for pe := valueAsMap.Head; pe != nil; pe = pe.Next {
+					newrec.PutCopy(pe.Key, pe.Value)
+				}
 				err := node.emitToRedirectFunc(newrec, state)
 				if err != nil {
 					return err
 				}
 
-			} else {
-				recurse := valueAsMap.IsNested()
-				if !recurse {
-					newrec := mlrval.NewMlrmapAsRecord()
-					for pe := valueAsMap.Head; pe != nil; pe = pe.Next {
-						newrec.PutCopy(pe.Key, pe.Value)
-					}
-					err := node.emitToRedirectFunc(newrec, state)
-					if err != nil {
-						return err
-					}
-
-				} else { // recurse
-					nextLevelNames := make([]string, 0)
-					nextLevelValues := make([]*mlrval.Mlrval, 0)
-					for pe := value.GetMap().Head; pe != nil; pe = pe.Next {
-						nextLevelNames = append(nextLevelNames, pe.Key)
-						nextLevelValues = append(nextLevelValues, pe.Value.Copy())
-					}
-					node.executeNonIndexedNonLashedEmit(nextLevelNames, nextLevelValues, state)
+			} else { // recurse
+				nextLevelNames := []string{}
+				nextLevelValues := []*mlrval.Mlrval{}
+				for pe := value.GetMap().Head; pe != nil; pe = pe.Next {
+					nextLevelNames = append(nextLevelNames, pe.Key)
+					nextLevelValues = append(nextLevelValues, pe.Value.Copy())
 				}
+				node.executeNonIndexedNonLashedEmit(nextLevelNames, nextLevelValues, state)
 			}
 		}
-
-		return nil
 	}
+
+	return nil
 }
 
 func (node *EmitXStatementNode) executeNonIndexedLashedEmitP(
@@ -574,7 +565,6 @@ func (node *EmitXStatementNode) executeIndexed(
 	}
 }
 
-// ----------------------------------------------------------------
 // Recurses over indices.
 //
 // Example:
@@ -690,7 +680,6 @@ func (node *EmitXStatementNode) executeIndexedNonLashedEmitAux(
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Example:
 //
 // DSL expression: @count[$a][$b] += 1; @sum[$a][$b] += $n; end { emit (@count, @sum), "a", "b" }
@@ -849,7 +838,6 @@ func (node *EmitXStatementNode) executeIndexedLashedEmitAux(
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Recurses over indices.
 
 func (node *EmitXStatementNode) executeIndexedNonLashedEmitPAux(
@@ -984,7 +972,7 @@ func (node *EmitXStatementNode) emitRecordToFileOrPipe(
 ) error {
 	redirectorTarget := node.redirectorTargetEvaluable.Evaluate(state)
 	if !redirectorTarget.IsString() {
-		return fmt.Errorf("mlr: output redirection yielded %s, not string", redirectorTarget.GetTypeName())
+		return fmt.Errorf("output redirection yielded %s, not string", redirectorTarget.GetTypeName())
 	}
 	outputFileName := redirectorTarget.String()
 
diff --git a/pkg/dsl/cst/emitf.go b/pkg/dsl/cst/emitf.go
index a06020529..386ba499d 100644
--- a/pkg/dsl/cst/emitf.go
+++ b/pkg/dsl/cst/emitf.go
@@ -1,7 +1,5 @@
-// ================================================================
 // This handles emitf statements. This produces new records (in addition to $*)
 // into the output record stream.
-// ================================================================
 
 package cst
 
@@ -16,7 +14,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ================================================================
 // Examples:
 //   emitf @a
 //   emitf @a, @b
@@ -39,7 +36,6 @@ type EmitFStatementNode struct {
 	outputHandlerManager      output.OutputHandlerManager // for file/pipe targets
 }
 
-// ----------------------------------------------------------------
 // $ mlr -n put -v 'emitf a,$b,@c'
 // DSL EXPRESSION:
 // emitf a,$b,@c
@@ -94,7 +90,7 @@ func (root *RootNode) BuildEmitFStatementNode(astNode *dsl.ASTNode) (IExecutable
 		lib.InternalCodingErrorIf(redirectorNode.Children == nil)
 		lib.InternalCodingErrorIf(len(redirectorNode.Children) != 1)
 		redirectorTargetNode := redirectorNode.Children[0]
-		var err error = nil
+		var err error
 
 		if redirectorTargetNode.Type == dsl.NodeTypeRedirectTargetStdout {
 			retval.emitfToRedirectFunc = retval.emitfToFileOrPipe
@@ -119,7 +115,7 @@ func (root *RootNode) BuildEmitFStatementNode(astNode *dsl.ASTNode) (IExecutable
 			} else if redirectorNode.Type == dsl.NodeTypeRedirectPipe {
 				retval.outputHandlerManager = output.NewPipeWriteHandlerManager(root.recordWriterOptions)
 			} else {
-				return nil, fmt.Errorf("mlr: unhandled redirector node type %s", string(redirectorNode.Type))
+				return nil, fmt.Errorf("unhandled redirector node type %s", string(redirectorNode.Type))
 			}
 		}
 	}
@@ -149,7 +145,6 @@ func (node *EmitFStatementNode) Execute(state *runtime.State) (*BlockExitPayload
 	return nil, err
 }
 
-// ----------------------------------------------------------------
 // Gets the name of a non-indexed oosvar, localvar, or field name; otherwise,
 // returns error.
 //
@@ -163,7 +158,7 @@ func getNameFromNamedNode(astNode *dsl.ASTNode, description string) (string, err
 	} else if astNode.Type == dsl.NodeTypeDirectFieldValue {
 		return string(astNode.Token.Lit), nil
 	}
-	return "", fmt.Errorf(`mlr: can't get name of node type "%s" for %s`, string(astNode.Type), description)
+	return "", fmt.Errorf(`can't get name of node type "%s" for %s`, string(astNode.Type), description)
 }
 
 func (node *EmitFStatementNode) emitfToRecordStream(
@@ -185,7 +180,7 @@ func (node *EmitFStatementNode) emitfToFileOrPipe(
 ) error {
 	redirectorTarget := node.redirectorTargetEvaluable.Evaluate(state)
 	if !redirectorTarget.IsString() {
-		return fmt.Errorf("mlr: output redirection yielded %s, not string", redirectorTarget.GetTypeName())
+		return fmt.Errorf("output redirection yielded %s, not string", redirectorTarget.GetTypeName())
 	}
 	outputFileName := redirectorTarget.String()
 
diff --git a/pkg/dsl/cst/env.go b/pkg/dsl/cst/env.go
index 25e70a511..e7659059d 100644
--- a/pkg/dsl/cst/env.go
+++ b/pkg/dsl/cst/env.go
@@ -1,9 +1,7 @@
-// ================================================================
 // This handles ENV["FOO"] on the right-hand side of an assignment.  Note that
 // environment variables aren't arbitrarily indexable like maps are -- they're
 // only a single-level map from string to string, managed indirectly through
 // library routines.
-// ================================================================
 
 package cst
 
diff --git a/pkg/dsl/cst/evaluable.go b/pkg/dsl/cst/evaluable.go
index abe25cf61..517cd77e2 100644
--- a/pkg/dsl/cst/evaluable.go
+++ b/pkg/dsl/cst/evaluable.go
@@ -1,8 +1,6 @@
-// ================================================================
 // This handles anything on the right-hand sides of assignment statements.
 // (Also, computed field names on the left-hand sides of assignment
 // statements.)
-// ================================================================
 
 package cst
 
@@ -123,7 +121,7 @@ func (node *IndirectFieldValueNode) Evaluate(
 	if err != nil {
 		// Key isn't int or string.
 		// TODO: needs error-return in the API
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 	if value == nil {
diff --git a/pkg/dsl/cst/filter.go b/pkg/dsl/cst/filter.go
index e1aa5ff9d..a7b7ec98d 100644
--- a/pkg/dsl/cst/filter.go
+++ b/pkg/dsl/cst/filter.go
@@ -1,4 +1,3 @@
-// ================================================================
 // This handles bare booleans and filter statements.
 //
 // Example of the former: 'NR > 10' or '$x =~ "(..)_(...)"' without if or '{...}' body.
@@ -14,7 +13,6 @@
 // e.g. if the user types '1+2' then the repl prints '3' and that expression is
 // stored as a bare-boolean evaluable. Which is a misnomer (sorry!) since 3 is
 // not a boolean.
-// ================================================================
 
 package cst
 
@@ -24,7 +22,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/runtime"
 )
 
-// ----------------------------------------------------------------
 // BareBooleanStatementNode is for implicit filter statements such as mlr
 // filter 'NR < 10' -- "implicit" since the word "filter" doesn't appear within
 // the single quotes as part of the DSL expression per se. Or (as noted above)
@@ -60,7 +57,6 @@ func (node *BareBooleanStatementNode) Execute(state *runtime.State) (*BlockExitP
 	return nil, nil
 }
 
-// ----------------------------------------------------------------
 // FilterStatementNode is for explicit filter statements such as mlr put
 // 'filter NR < 10', where the word "filter" appears within the single quotes
 // and is part of the DSL expression per se.
diff --git a/pkg/dsl/cst/for.go b/pkg/dsl/cst/for.go
index e7c13ea43..c195068c4 100644
--- a/pkg/dsl/cst/for.go
+++ b/pkg/dsl/cst/for.go
@@ -1,6 +1,4 @@
-// ================================================================
 // This is for various flavors of for-loop
-// ================================================================
 
 package cst
 
@@ -14,7 +12,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/runtime"
 )
 
-// ----------------------------------------------------------------
 // Sample AST:
 
 // mlr -n put -v 'for (k in $*) { emit { k : k } }'
@@ -50,7 +47,6 @@ func NewForLoopOneVariableNode(
 	}
 }
 
-// ----------------------------------------------------------------
 // Sample AST:
 
 // mlr -n put -v 'for (k in $*) { emit { k : k } }'
@@ -100,7 +96,6 @@ func (root *RootNode) BuildForLoopOneVariableNode(astNode *dsl.ASTNode) (*ForLoo
 	), nil
 }
 
-// ----------------------------------------------------------------
 // Note: The statement-block has its own push/pop for its localvars.
 // Meanwhile we need to restrict scope of the bindvar to the for-loop.
 //
@@ -224,7 +219,6 @@ func NewForLoopTwoVariableNode(
 	}
 }
 
-// ----------------------------------------------------------------
 // Sample AST:
 
 // mlr -n put -v 'for (k, v in $*) { emit { k : v } }'
@@ -282,7 +276,6 @@ func (root *RootNode) BuildForLoopTwoVariableNode(astNode *dsl.ASTNode) (*ForLoo
 	), nil
 }
 
-// ----------------------------------------------------------------
 // Note: The statement-block has its own push/pop for its localvars.
 // Meanwhile we need to restrict scope of the bindvar to the for-loop.
 //
@@ -416,7 +409,6 @@ func NewForLoopMultivariableNode(
 	}
 }
 
-// ----------------------------------------------------------------
 // Sample AST:
 
 // mlr -n put -v 'for ((k1, k2), v in $*) { }'
@@ -477,7 +469,6 @@ func (root *RootNode) BuildForLoopMultivariableNode(
 	), nil
 }
 
-// ----------------------------------------------------------------
 // Note: The statement-block has its own push/pop for its localvars.
 // Meanwhile we need to restrict scope of the bindvar to the for-loop.
 //
@@ -507,12 +498,11 @@ func (node *ForLoopMultivariableNode) Execute(state *runtime.State) (*BlockExitP
 	blockExitPayload, err := node.executeOuter(indexMlrval, node.keyIndexVariables, state)
 	if blockExitPayload == nil {
 		return nil, err
+	}
+	if blockExitPayload.blockExitStatus == BLOCK_EXIT_BREAK {
+		return nil, err
 	} else {
-		if blockExitPayload.blockExitStatus == BLOCK_EXIT_BREAK {
-			return nil, err
-		} else {
-			return blockExitPayload, err
-		}
+		return blockExitPayload, err
 	}
 }
 
@@ -726,7 +716,6 @@ func NewTripleForLoopNode(
 	}
 }
 
-// ----------------------------------------------------------------
 // Sample ASTs:
 
 // DSL EXPRESSION:
@@ -799,7 +788,7 @@ func (root *RootNode) BuildTripleForLoopNode(astNode *dsl.ASTNode) (*TripleForLo
 			for i := 0; i < n-1; i++ {
 				if continuationExpressionASTNode.Children[i].Type != dsl.NodeTypeAssignment {
 					return nil, fmt.Errorf(
-						"mlr: the non-final triple-for continuation statements must be assignments",
+						"the non-final triple-for continuation statements must be assignments",
 					)
 				}
 				precontinuationAssignment, err := root.BuildAssignmentNode(
@@ -816,11 +805,11 @@ func (root *RootNode) BuildTripleForLoopNode(astNode *dsl.ASTNode) (*TripleForLo
 		if bareBooleanASTNode.Type != dsl.NodeTypeBareBoolean {
 			if n == 1 {
 				return nil, fmt.Errorf(
-					"mlr: the triple-for continuation statement must be a bare boolean",
+					"the triple-for continuation statement must be a bare boolean",
 				)
 			} else {
 				return nil, fmt.Errorf(
-					"mlr: the final triple-for continuation statement must be a bare boolean",
+					"the final triple-for continuation statement must be a bare boolean",
 				)
 			}
 		}
@@ -852,7 +841,6 @@ func (root *RootNode) BuildTripleForLoopNode(astNode *dsl.ASTNode) (*TripleForLo
 	), nil
 }
 
-// ----------------------------------------------------------------
 // Note: The statement-block has its own push/pop for its localvars.
 // Meanwhile we need to restrict scope of the bindvar to the for-loop.
 //
@@ -892,7 +880,7 @@ func (node *TripleForLoopNode) Execute(state *runtime.State) (*BlockExitPayload,
 			boolValue, isBool := continuationValue.GetBoolValue()
 			if !isBool {
 				return nil, fmt.Errorf(
-					"mlr: for-loop continuation did not evaluate to boolean%s",
+					"for-loop continuation did not evaluate to boolean%s",
 					dsl.TokenToLocationInfo(node.continuationExpressionToken),
 				)
 			}
diff --git a/pkg/dsl/cst/functions.go b/pkg/dsl/cst/functions.go
index c214cd349..ec9d042c5 100644
--- a/pkg/dsl/cst/functions.go
+++ b/pkg/dsl/cst/functions.go
@@ -1,10 +1,8 @@
-// ================================================================
 // CST build/execute for AST operator/function nodes.
 //
 // Operators and functions are semantically the same thing -- they differ only
 // syntactically. Binary operators are infix, like '1+2', while functions are
 // prefix, like 'max(1,2)'. Both parse to the same AST shape.
-// ================================================================
 
 package cst
 
@@ -13,7 +11,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/lib"
 )
 
-// ----------------------------------------------------------------
 // Function lookup:
 //
 // * Try builtins first
@@ -94,8 +91,7 @@ func (root *RootNode) BuildFunctionCallsiteNode(astNode *dsl.ASTNode) (IEvaluabl
 		udfCallsiteNode := NewUDFCallsite(argumentNodes, udf)
 		root.rememberUnresolvedFunctionCallsite(udfCallsiteNode)
 		return udfCallsiteNode, nil
-	} else {
-		udfCallsiteNode := NewUDFCallsite(argumentNodes, udf)
-		return udfCallsiteNode, nil
 	}
+	udfCallsiteNode := NewUDFCallsite(argumentNodes, udf)
+	return udfCallsiteNode, nil
 }
diff --git a/pkg/dsl/cst/hofs.go b/pkg/dsl/cst/hofs.go
index 67ab64b4a..7bb0be11d 100644
--- a/pkg/dsl/cst/hofs.go
+++ b/pkg/dsl/cst/hofs.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Support for higher-order functions in Miller: select, apply, fold, reduce,
 // sort, any, and every.
-// ================================================================
 
 package cst
 
@@ -194,7 +192,6 @@ func isFunctionOrDie(mlrval *mlrval.Mlrval, hofName string) {
 	}
 }
 
-// ================================================================
 // SELECT HOF
 
 func SelectHOF(
@@ -206,9 +203,8 @@ func SelectHOF(
 		return selectArray(input1, input2, state)
 	} else if input1.IsMap() {
 		return selectMap(input1, input2, state)
-	} else {
-		return mlrval.FromNotCollectionError("select", input1)
 	}
+	return mlrval.FromNotCollectionError("select", input1)
 }
 
 func selectArray(
@@ -285,7 +281,6 @@ func selectMap(
 	return mlrval.FromMap(outputMap)
 }
 
-// ================================================================
 // APPLY HOF
 
 func ApplyHOF(
@@ -297,9 +292,8 @@ func ApplyHOF(
 		return applyArray(input1, input2, state)
 	} else if input1.IsMap() {
 		return applyMap(input1, input2, state)
-	} else {
-		return mlrval.FromNotCollectionError("apply", input1)
 	}
+	return mlrval.FromNotCollectionError("apply", input1)
 }
 
 func applyArray(
@@ -356,7 +350,6 @@ func applyMap(
 	return mlrval.FromMap(outputMap)
 }
 
-// ================================================================
 // REDUCE HOF
 
 func ReduceHOF(
@@ -368,9 +361,8 @@ func ReduceHOF(
 		return reduceArray(input1, input2, state)
 	} else if input1.IsMap() {
 		return reduceMap(input1, input2, state)
-	} else {
-		return mlrval.FromNotCollectionError("reduce", input1)
 	}
+	return mlrval.FromNotCollectionError("reduce", input1)
 }
 
 func reduceArray(
@@ -435,7 +427,6 @@ func reduceMap(
 	return mlrval.FromMap(accumulator)
 }
 
-// ================================================================
 // FOLD HOF
 
 func FoldHOF(
@@ -448,9 +439,8 @@ func FoldHOF(
 		return foldArray(input1, input2, input3, state)
 	} else if input1.IsMap() {
 		return foldMap(input1, input2, input3, state)
-	} else {
-		return mlrval.FromNotCollectionError("fold", input1)
 	}
+	return mlrval.FromNotCollectionError("fold", input1)
 }
 
 func foldArray(
@@ -514,7 +504,6 @@ func foldMap(
 	return mlrval.FromMap(accumulator)
 }
 
-// ================================================================
 // SORT HOF
 
 func SortHOF(
@@ -527,40 +516,35 @@ func SortHOF(
 			return sortA(inputs[0], "")
 		} else if inputs[0].IsMap() {
 			return sortM(inputs[0], "")
-		} else {
-			return mlrval.FromNotCollectionError("sort", inputs[0])
 		}
+		return mlrval.FromNotCollectionError("sort", inputs[0])
 
 	} else if inputs[1].IsStringOrVoid() {
 		if inputs[0].IsArray() {
 			return sortA(inputs[0], inputs[1].String())
 		} else if inputs[0].IsMap() {
 			return sortM(inputs[0], inputs[1].String())
-		} else {
-			return mlrval.FromNotCollectionError("sort", inputs[0])
 		}
+		return mlrval.FromNotCollectionError("sort", inputs[0])
 
 	} else if inputs[1].IsFunction() {
 		if inputs[0].IsArray() {
 			return sortAF(inputs[0], inputs[1], state)
 		} else if inputs[0].IsMap() {
 			return sortMF(inputs[0], inputs[1], state)
-		} else {
-			return mlrval.FromNotCollectionError("sort", inputs[0])
 		}
+		return mlrval.FromNotCollectionError("sort", inputs[0])
 
-	} else {
-		fmt.Fprintf(os.Stderr, "mlr: sort: second argument must be a string or function; got %s.\n",
-			inputs[1].GetTypeName(),
-		)
-		os.Exit(1)
 	}
+	fmt.Fprintf(os.Stderr, "mlr: sort: second argument must be a string or function; got %s.\n",
+		inputs[1].GetTypeName(),
+	)
+	os.Exit(1)
 	// Not reached
 	lib.InternalCodingErrorIf(true)
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Helpers for sort with string flags in place of callback UDF.
 
 type tSortType int
@@ -727,9 +711,8 @@ func sortMNumerical(array []mlrval.MlrmapEntryForArray, reverse bool, byMapValue
 				nb, errb := strconv.ParseFloat(array[j].Key, 64)
 				if erra == nil && errb == nil {
 					return na < nb
-				} else {
-					return array[i].Key < array[j].Key
 				}
+				return array[i].Key < array[j].Key
 			})
 		} else {
 			sort.Slice(array, func(i, j int) bool {
@@ -737,9 +720,8 @@ func sortMNumerical(array []mlrval.MlrmapEntryForArray, reverse bool, byMapValue
 				nb, errb := strconv.ParseFloat(array[j].Key, 64)
 				if erra == nil && errb == nil {
 					return na > nb
-				} else {
-					return array[i].Key > array[j].Key
 				}
+				return array[i].Key > array[j].Key
 			})
 		}
 	} else {
@@ -921,7 +903,6 @@ func sortMF(
 	return mlrval.FromMap(sortedMap)
 }
 
-// ================================================================
 // ANY HOF
 
 func AnyHOF(
@@ -933,9 +914,8 @@ func AnyHOF(
 		return anyArray(input1, input2, state)
 	} else if input1.IsMap() {
 		return anyMap(input1, input2, state)
-	} else {
-		return mlrval.FromNotCollectionError("any", input1)
 	}
+	return mlrval.FromNotCollectionError("any", input1)
 }
 
 func anyArray(
@@ -1013,7 +993,6 @@ func anyMap(
 	return mlrval.FromBool(boolAny)
 }
 
-// ================================================================
 // EVERY HOF
 
 func EveryHOF(
@@ -1025,9 +1004,8 @@ func EveryHOF(
 		return everyArray(input1, input2, state)
 	} else if input1.IsMap() {
 		return everyMap(input1, input2, state)
-	} else {
-		return mlrval.FromNotCollectionError("every", input1)
 	}
+	return mlrval.FromNotCollectionError("every", input1)
 }
 
 func everyArray(
diff --git a/pkg/dsl/cst/if.go b/pkg/dsl/cst/if.go
index ba264bffa..e8ae84476 100644
--- a/pkg/dsl/cst/if.go
+++ b/pkg/dsl/cst/if.go
@@ -1,6 +1,4 @@
-// ================================================================
 // This is for if/elif/elif/else chains.
-// ================================================================
 
 package cst
 
@@ -24,7 +22,6 @@ func NewIfChainNode(ifItems []*IfItem) *IfChainNode {
 	}
 }
 
-// ----------------------------------------------------------------
 // For each if/elif/elif/else portion: the conditional part (...) and the
 // statement-block part {...}. For "else", the conditional is nil.
 type IfItem struct {
@@ -33,7 +30,6 @@ type IfItem struct {
 	statementBlockNode *StatementBlockNode
 }
 
-// ----------------------------------------------------------------
 // Sample AST:
 
 // DSL EXPRESSION:
@@ -74,7 +70,7 @@ type IfItem struct {
 func (root *RootNode) BuildIfChainNode(astNode *dsl.ASTNode) (*IfChainNode, error) {
 	lib.InternalCodingErrorIf(astNode.Type != dsl.NodeTypeIfChain)
 
-	ifItems := make([]*IfItem, 0)
+	ifItems := []*IfItem{}
 
 	astChildren := astNode.Children
 
@@ -128,7 +124,7 @@ func (node *IfChainNode) Execute(state *runtime.State) (*BlockExitPayload, error
 		boolValue, isBool := condition.GetBoolValue()
 		if !isBool {
 			return nil, fmt.Errorf(
-				"mlr: conditional expression did not evaluate to boolean%s",
+				"conditional expression did not evaluate to boolean%s",
 				dsl.TokenToLocationInfo(ifItem.conditionToken),
 			)
 		}
diff --git a/pkg/dsl/cst/keyword_usage.go b/pkg/dsl/cst/keyword_usage.go
index 2a49565e0..92bf7b9d4 100644
--- a/pkg/dsl/cst/keyword_usage.go
+++ b/pkg/dsl/cst/keyword_usage.go
@@ -73,8 +73,6 @@ var KEYWORD_USAGE_TABLE = []tKeywordUsageEntry{
 	{"ORS", ORSKeywordUsage},
 }
 
-// ----------------------------------------------------------------
-
 // Pass function_name == NULL to get usage for all keywords.
 func UsageKeywords() {
 	for i, entry := range KEYWORD_USAGE_TABLE {
diff --git a/pkg/dsl/cst/leaves.go b/pkg/dsl/cst/leaves.go
index d55adf947..da32583ed 100644
--- a/pkg/dsl/cst/leaves.go
+++ b/pkg/dsl/cst/leaves.go
@@ -1,6 +1,4 @@
-// ================================================================
 // CST build/execute for AST leaf nodes
-// ================================================================
 
 package cst
 
@@ -105,9 +103,8 @@ func (node *DirectFieldRvalueNode) Evaluate(
 	value := state.Inrec.Get(node.fieldName)
 	if value == nil {
 		return mlrval.ABSENT.StrictModeCheck(state.StrictMode, "$"+node.fieldName)
-	} else {
-		return value
 	}
+	return value
 }
 
 type FullSrecRvalueNode struct {
@@ -126,9 +123,8 @@ func (node *FullSrecRvalueNode) Evaluate(
 	// to access the inrec, and that would get past the validator.
 	if state.Inrec == nil {
 		return mlrval.ABSENT.StrictModeCheck(state.StrictMode, "$*")
-	} else {
-		return mlrval.FromMap(state.Inrec)
 	}
+	return mlrval.FromMap(state.Inrec)
 }
 
 type DirectOosvarRvalueNode struct {
@@ -146,9 +142,8 @@ func (node *DirectOosvarRvalueNode) Evaluate(
 	value := state.Oosvars.Get(node.variableName)
 	if value == nil {
 		return mlrval.ABSENT.StrictModeCheck(state.StrictMode, "@"+node.variableName)
-	} else {
-		return value
 	}
+	return value
 }
 
 type FullOosvarRvalueNode struct {
@@ -163,7 +158,6 @@ func (node *FullOosvarRvalueNode) Evaluate(
 	return mlrval.FromMap(state.Oosvars)
 }
 
-// ----------------------------------------------------------------
 // TODO: rename this node-type.
 // RHSes can be:
 // * Local variables, like `x` in `x = 3`
@@ -204,7 +198,6 @@ func (node *LocalVariableNode) Evaluate(
 	return mlrval.ABSENT.StrictModeCheck(state.StrictMode, "local variable "+node.stackVariable.GetName())
 }
 
-// ----------------------------------------------------------------
 // During the BNF parse all string literals -- "foo" or "(..)_(...)" regexes
 // etc -- are marked as dsl.NodeTypeStringLiteral. However, a CST-build
 // pre-pass relabels second argument to sub/gsub etc -- any known regex
@@ -228,7 +221,6 @@ func (node *RegexLiteralNode) Evaluate(
 	return node.literal
 }
 
-// ----------------------------------------------------------------
 // StringLiteralNode is for any string literal that doesn't have any "\0" ..
 // "\9" in it.
 type StringLiteralNode struct {
@@ -366,7 +358,6 @@ func (node *NullLiteralNode) Evaluate(
 	return node.literal
 }
 
-// ----------------------------------------------------------------
 // Used for testing purposes; not used by the main DSL.
 
 type MlrvalLiteralNode struct {
@@ -643,7 +634,6 @@ func (node *LiteralEmptyStringNode) Evaluate(
 	return mlrval.FromString("")
 }
 
-// ----------------------------------------------------------------
 // The panic token is a special token which causes a panic when evaluated.
 // This is for testing that AND/OR short-circuiting is implemented correctly:
 // output = input1 || panic should NOT panic the process when input1 is true.
diff --git a/pkg/dsl/cst/lvalues.go b/pkg/dsl/cst/lvalues.go
index ac2631884..1f917ce9f 100644
--- a/pkg/dsl/cst/lvalues.go
+++ b/pkg/dsl/cst/lvalues.go
@@ -1,7 +1,5 @@
-// ================================================================
 // This is for Lvalues, i.e. things on the left-hand-side of an assignment
 // statement.
-// ================================================================
 
 package cst
 
@@ -45,11 +43,11 @@ func (root *RootNode) BuildAssignableNode(
 
 	case dsl.NodeTypeArrayOrMapPositionalNameAccess:
 		return nil, fmt.Errorf(
-			"mlr: '[[...]]' is allowed on assignment left-hand sides only when immediately preceded by '$'",
+			"'[[...]]' is allowed on assignment left-hand sides only when immediately preceded by '$'",
 		)
 	case dsl.NodeTypeArrayOrMapPositionalValueAccess:
 		return nil, fmt.Errorf(
-			"mlr: '[[[...]]]' is allowed on assignment left-hand sides only when immediately preceded by '$'",
+			"'[[[...]]]' is allowed on assignment left-hand sides only when immediately preceded by '$'",
 		)
 
 	case dsl.NodeTypeArrayOrMapIndexAccess:
@@ -116,12 +114,11 @@ func (node *DirectFieldValueLvalueNode) AssignIndexed(
 			return err
 		}
 		return nil
-	} else {
-		return state.Inrec.PutIndexed(
-			append([]*mlrval.Mlrval{node.lhsFieldName}, indices...),
-			rvalue,
-		)
 	}
+	return state.Inrec.PutIndexed(
+		append([]*mlrval.Mlrval{node.lhsFieldName}, indices...),
+		rvalue,
+	)
 }
 
 func (node *DirectFieldValueLvalueNode) Unassign(
@@ -214,12 +211,11 @@ func (node *IndirectFieldValueLvalueNode) AssignIndexed(
 			return err
 		}
 		return nil
-	} else {
-		return state.Inrec.PutIndexed(
-			append([]*mlrval.Mlrval{lhsFieldName.Copy()}, indices...),
-			rvalue,
-		)
 	}
+	return state.Inrec.PutIndexed(
+		append([]*mlrval.Mlrval{lhsFieldName.Copy()}, indices...),
+		rvalue,
+	)
 }
 
 func (node *IndirectFieldValueLvalueNode) Unassign(
@@ -252,7 +248,6 @@ func (node *IndirectFieldValueLvalueNode) UnassignIndexed(
 	}
 }
 
-// ----------------------------------------------------------------
 // Set the name at 2nd positional index in the current stream record: e.g.
 // '$[[2]] = "abc"
 
@@ -306,12 +301,11 @@ func (node *PositionalFieldNameLvalueNode) Assign(
 		// TODO: incorporate error-return into this API
 		state.Inrec.PutNameWithPositionalIndex(index, rvalue)
 		return nil
-	} else {
-		return fmt.Errorf(
-			"mlr: positional index for $[[...]] assignment must be integer; got %s",
-			lhsFieldIndex.GetTypeName(),
-		)
 	}
+	return fmt.Errorf(
+		"positional index for $[[...]] assignment must be integer; got %s",
+		lhsFieldIndex.GetTypeName(),
+	)
 }
 
 func (node *PositionalFieldNameLvalueNode) AssignIndexed(
@@ -322,7 +316,7 @@ func (node *PositionalFieldNameLvalueNode) AssignIndexed(
 	// TODO: reconsider this if /when we decide to allow string-slice
 	// assignments.
 	return fmt.Errorf(
-		"mlr: $[[...]] = ... expressions are not indexable",
+		"$[[...]] = ... expressions are not indexable",
 	)
 }
 
@@ -362,7 +356,6 @@ func (node *PositionalFieldNameLvalueNode) UnassignIndexed(
 	}
 }
 
-// ----------------------------------------------------------------
 // Set the value at 2nd positional index in the current stream record: e.g.
 // '$[[[2]]] = "abc"
 
@@ -430,12 +423,11 @@ func (node *PositionalFieldValueLvalueNode) AssignIndexed(
 			//return nil
 			state.Inrec.PutCopyWithPositionalIndex(index, rvalue)
 			return nil
-		} else {
-			return fmt.Errorf(
-				"mlr: positional index for $[[[...]]] assignment must be integer; got %s",
-				lhsFieldIndex.GetTypeName(),
-			)
 		}
+		return fmt.Errorf(
+			"positional index for $[[[...]]] assignment must be integer; got %s",
+			lhsFieldIndex.GetTypeName(),
+		)
 	} else {
 		// xxx positional
 		return state.Inrec.PutIndexed(
@@ -592,12 +584,11 @@ func (node *DirectOosvarValueLvalueNode) AssignIndexed(
 			return err
 		}
 		return nil
-	} else {
-		return state.Oosvars.PutIndexed(
-			append([]*mlrval.Mlrval{node.lhsOosvarName}, indices...),
-			rvalue,
-		)
 	}
+	return state.Oosvars.PutIndexed(
+		append([]*mlrval.Mlrval{node.lhsOosvarName}, indices...),
+		rvalue,
+	)
 }
 
 func (node *DirectOosvarValueLvalueNode) Unassign(
@@ -671,12 +662,11 @@ func (node *IndirectOosvarValueLvalueNode) AssignIndexed(
 			return err
 		}
 		return nil
-	} else {
-		return state.Oosvars.PutIndexed(
-			append([]*mlrval.Mlrval{lhsOosvarName.Copy()}, indices...),
-			rvalue,
-		)
 	}
+	return state.Oosvars.PutIndexed(
+		append([]*mlrval.Mlrval{lhsOosvarName.Copy()}, indices...),
+		rvalue,
+	)
 }
 
 func (node *IndirectOosvarValueLvalueNode) Unassign(
@@ -780,7 +770,7 @@ func (root *RootNode) BuildLocalVariableLvalueNode(astNode *dsl.ASTNode) (IAssig
 	if astNode.Children == nil { // untyped, like 'x = 3'
 		if root.strictMode {
 			return nil, fmt.Errorf(
-				`mlr: need typedecl such as "var", "str", "num", etc. for variable "%s" in strict mode`,
+				`need typedecl such as "var", "str", "num", etc. for variable "%s" in strict mode`,
 				variableName,
 			)
 		}
@@ -823,7 +813,7 @@ func (node *LocalVariableLvalueNode) AssignIndexed(
 ) error {
 	// AssignmentNode checks for absent, so we just assign whatever we get
 	lib.InternalCodingErrorIf(rvalue.IsAbsent())
-	var err error = nil
+	var err error
 	if indices == nil {
 		if node.defineTypedAtScope {
 			err = state.Stack.DefineTypedAtScope(node.stackVariable, node.typeName, rvalue)
@@ -856,7 +846,6 @@ func (node *LocalVariableLvalueNode) UnassignIndexed(
 	}
 }
 
-// ----------------------------------------------------------------
 // IndexedValueNode is a delegator to base-lvalue types.
 // * The baseLvalue is some IAssignable
 // * The indexEvaluables are an array of IEvaluables
@@ -878,8 +867,8 @@ func (root *RootNode) BuildIndexedLvalueNode(astNode *dsl.ASTNode) (IAssignable,
 	lib.InternalCodingErrorIf(astNode == nil)
 
 	var baseLvalue IAssignable = nil
-	indexEvaluables := make([]IEvaluable, 0)
-	var err error = nil
+	indexEvaluables := []IEvaluable{}
+	var err error
 
 	// $ mlr -n put -v '$x[1][2]=3'
 	// DSL EXPRESSION:
@@ -1051,7 +1040,7 @@ func (node *EnvironmentVariableLvalueNode) AssignIndexed(
 	indices []*mlrval.Mlrval,
 	state *runtime.State,
 ) error {
-	return fmt.Errorf("mlr: ENV[...] cannot be indexed")
+	return fmt.Errorf("ENV[...] cannot be indexed")
 }
 
 func (node *EnvironmentVariableLvalueNode) Unassign(
diff --git a/pkg/dsl/cst/print.go b/pkg/dsl/cst/print.go
index bc62f0798..739b2af9e 100644
--- a/pkg/dsl/cst/print.go
+++ b/pkg/dsl/cst/print.go
@@ -1,6 +1,4 @@
-// ================================================================
 // This handles print, printn, eprint, and eprintn statements.
-// ================================================================
 
 package cst
 
@@ -16,7 +14,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ----------------------------------------------------------------
 // Example ASTs:
 //
 // $ mlr -n put -v 'print $a, $b'
@@ -197,7 +194,6 @@ func (root *RootNode) BuildEprintnStatementNode(astNode *dsl.ASTNode) (IExecutab
 	)
 }
 
-// ----------------------------------------------------------------
 // Common code for building print/eprint/printn/eprintn nodes
 
 func (root *RootNode) buildPrintxStatementNode(
@@ -257,7 +253,7 @@ func (root *RootNode) buildPrintxStatementNode(
 		lib.InternalCodingErrorIf(redirectorNode.Children == nil)
 		lib.InternalCodingErrorIf(len(redirectorNode.Children) != 1)
 		redirectorTargetNode := redirectorNode.Children[0]
-		var err error = nil
+		var err error
 
 		if redirectorTargetNode.Type == dsl.NodeTypeRedirectTargetStdout {
 			retval.printToRedirectFunc = retval.printToStdout
@@ -278,7 +274,7 @@ func (root *RootNode) buildPrintxStatementNode(
 			} else if redirectorNode.Type == dsl.NodeTypeRedirectPipe {
 				retval.outputHandlerManager = output.NewPipeWriteHandlerManager(root.recordWriterOptions)
 			} else {
-				return nil, fmt.Errorf("mlr: unhandled redirector node type %s", string(redirectorNode.Type))
+				return nil, fmt.Errorf("unhandled redirector node type %s", string(redirectorNode.Type))
 			}
 		}
 	}
@@ -350,7 +346,7 @@ func (node *PrintStatementNode) printToFileOrPipe(
 ) error {
 	redirectorTarget := node.redirectorTargetEvaluable.Evaluate(state)
 	if !redirectorTarget.IsString() {
-		return fmt.Errorf("mlr: output redirection yielded %s, not string", redirectorTarget.GetTypeName())
+		return fmt.Errorf("output redirection yielded %s, not string", redirectorTarget.GetTypeName())
 	}
 	outputFileName := redirectorTarget.String()
 
diff --git a/pkg/dsl/cst/root.go b/pkg/dsl/cst/root.go
index 099301bac..968eebb3e 100644
--- a/pkg/dsl/cst/root.go
+++ b/pkg/dsl/cst/root.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Top-level entry point for building a CST from an AST at parse time, and for
 // executing the CST at runtime.
-// ================================================================
 
 package cst
 
@@ -29,16 +27,16 @@ func NewEmptyRoot(
 	dslInstanceType DSLInstanceType, // mlr put, mlr filter, or mlr repl
 ) *RootNode {
 	return &RootNode{
-		beginBlocks:                   make([]*StatementBlockNode, 0),
+		beginBlocks:                   []*StatementBlockNode{},
 		mainBlock:                     NewStatementBlockNode(),
 		replImmediateBlock:            NewStatementBlockNode(),
-		endBlocks:                     make([]*StatementBlockNode, 0),
+		endBlocks:                     []*StatementBlockNode{},
 		udfManager:                    NewUDFManager(),
 		udsManager:                    NewUDSManager(),
 		allowUDFUDSRedefinitions:      false,
-		unresolvedFunctionCallsites:   make([]*UDFCallsite, 0),
-		unresolvedSubroutineCallsites: make([]*UDSCallsite, 0),
-		outputHandlerManagers:         make([]output.OutputHandlerManager, 0),
+		unresolvedFunctionCallsites:   []*UDFCallsite{},
+		unresolvedSubroutineCallsites: []*UDSCallsite{},
+		outputHandlerManagers:         []output.OutputHandlerManager{},
 		recordWriterOptions:           recordWriterOptions,
 		dslInstanceType:               dslInstanceType,
 	}
@@ -58,8 +56,6 @@ func (root *RootNode) WithStrictMode(strictMode bool) *RootNode {
 	return root
 }
 
-// ----------------------------------------------------------------
-
 // ASTBuildVisitorFunc is a callback, used by RootNode's Build method, which
 // CST-builder callsites can use to visit parse-to-AST result of multi-string
 // DSL inputs. Nominal use: mlr put -v, mlr put -d, etc.
@@ -76,9 +72,6 @@ func (root *RootNode) Build(
 	doWarnings bool,
 	astBuildVisitorFunc ASTBuildVisitorFunc,
 ) (hadWarnings bool, err error) {
-	hadWarnings = false
-	err = nil
-
 	for _, dslString := range dslStrings {
 		astRootNode, err := buildASTFromStringWithMessage(dslString)
 		if err != nil {
@@ -116,9 +109,8 @@ func buildASTFromStringWithMessage(dslString string) (*dsl.AST, error) {
 		// At present it's overly parser-internal, and confusing. :(
 		fmt.Fprintln(os.Stderr, "mlr: cannot parse DSL expression.")
 		return nil, err
-	} else {
-		return astRootNode, nil
 	}
+	return astRootNode, nil
 }
 
 func buildASTFromString(dslString string) (*dsl.AST, error) {
@@ -145,8 +137,6 @@ func buildASTFromString(dslString string) (*dsl.AST, error) {
 	return astRootNode, nil
 }
 
-// ----------------------------------------------------------------
-
 // If the user has multiple put -f / put -e pieces, we can AST-parse each
 // separately and build them. However we cannot resolve UDF/UDS references
 // until after they're all ingested -- e.g. first piece calls a function which
@@ -159,9 +149,6 @@ func (root *RootNode) IngestAST(
 	isReplImmediate bool,
 	doWarnings bool,
 ) (hadWarnings bool, err error) {
-	hadWarnings = false
-	err = nil
-
 	if ast.RootNode == nil {
 		return hadWarnings, errors.New("cannot build CST from nil AST root")
 	}
@@ -213,7 +200,6 @@ func (root *RootNode) Resolve() error {
 	return nil
 }
 
-// ----------------------------------------------------------------
 // regexProtectPrePass rewrites string-literal nodes in regex position (e.g.
 // second arg to gsub) to have regex node type. This is so we can have "\t" be
 // a tab character for string literals generally, but remain backslash-t for
@@ -283,7 +269,6 @@ func (root *RootNode) regexProtectPrePassAux(astNode *dsl.ASTNode) {
 
 }
 
-// ----------------------------------------------------------------
 // This builds the CST almost entirely. The only afterwork is that user-defined
 // functions may be called before they are defined, so a follow-up pass will
 // need to resolve those callsites.
@@ -415,7 +400,7 @@ func (root *RootNode) resolveSubroutineCallsites() error {
 			return err
 		}
 		if uds == nil {
-			return errors.New("mlr: subroutine name not found: " + subroutineName)
+			return errors.New("subroutine name not found: " + subroutineName)
 		}
 
 		unresolvedSubroutineCallsite.uds = uds
@@ -423,7 +408,6 @@ func (root *RootNode) resolveSubroutineCallsites() error {
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Various 'tee > $hostname . ".dat", $*' statements will have
 // OutputHandlerManager instances to track file-descriptors for all unique
 // values of $hostname in the input stream.
@@ -480,7 +464,6 @@ func (root *RootNode) ExecuteEndBlocks(state *runtime.State) error {
 	return nil
 }
 
-// ----------------------------------------------------------------
 // These are for the Miller REPL.
 
 // If a DSL string was parsed into an AST and ingested in 'immediate' mode and
@@ -497,8 +480,8 @@ func (root *RootNode) ExecuteREPLImmediate(state *runtime.State) (outrec *mlrval
 // This is the 'and then discarded' part of that.
 func (root *RootNode) ResetForREPL() {
 	root.replImmediateBlock = NewStatementBlockNode()
-	root.unresolvedFunctionCallsites = make([]*UDFCallsite, 0)
-	root.unresolvedSubroutineCallsites = make([]*UDSCallsite, 0)
+	root.unresolvedFunctionCallsites = []*UDFCallsite{}
+	root.unresolvedSubroutineCallsites = []*UDSCallsite{}
 }
 
 // This is for the REPL's context-printer command.
@@ -510,15 +493,15 @@ func (root *RootNode) ShowBlockReport() {
 
 // This is for the REPL's resetblocks command.
 func (root *RootNode) ResetBeginBlocksForREPL() {
-	root.beginBlocks = make([]*StatementBlockNode, 0)
+	root.beginBlocks = []*StatementBlockNode{}
 }
 
 // This is for the REPL's resetblocks command.
 func (root *RootNode) ResetMainBlockForREPL() {
-	root.mainBlock.executables = make([]IExecutable, 0)
+	root.mainBlock.executables = []IExecutable{}
 }
 
 // This is for the REPL's resetblocks command.
 func (root *RootNode) ResetEndBlocksForREPL() {
-	root.endBlocks = make([]*StatementBlockNode, 0)
+	root.endBlocks = []*StatementBlockNode{}
 }
diff --git a/pkg/dsl/cst/signature.go b/pkg/dsl/cst/signature.go
index 26aac975c..19f926979 100644
--- a/pkg/dsl/cst/signature.go
+++ b/pkg/dsl/cst/signature.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Signatures for user-defined functions and user-defined subroutines
 // ("UDFs" and "UDSs").
-// ================================================================
 
 package cst
 
diff --git a/pkg/dsl/cst/statements.go b/pkg/dsl/cst/statements.go
index eb1853513..e595cf065 100644
--- a/pkg/dsl/cst/statements.go
+++ b/pkg/dsl/cst/statements.go
@@ -1,7 +1,5 @@
-// ================================================================
 // CST build/execute for statements: assignments, bare booleans,
 // break/continue/return, etc.
-// ================================================================
 
 package cst
 
@@ -16,7 +14,7 @@ func (root *RootNode) BuildStatementNode(
 ) (IExecutable, error) {
 
 	var statement IExecutable = nil
-	var err error = nil
+	var err error
 	switch astNode.Type {
 
 	case dsl.NodeTypeAssignment:
@@ -66,9 +64,9 @@ func (root *RootNode) BuildStatementNode(
 		return root.BuildEmitPStatementNode(astNode)
 
 	case dsl.NodeTypeBeginBlock:
-		return nil, fmt.Errorf("mlr: begin blocks may only be declared at top level")
+		return nil, fmt.Errorf("begin blocks may only be declared at top level")
 	case dsl.NodeTypeEndBlock:
-		return nil, fmt.Errorf("mlr: end blocks may only be declared at top level")
+		return nil, fmt.Errorf("end blocks may only be declared at top level")
 
 	case dsl.NodeTypeIfChain:
 		return root.BuildIfChainNode(astNode)
@@ -88,9 +86,9 @@ func (root *RootNode) BuildStatementNode(
 		return root.BuildTripleForLoopNode(astNode)
 
 	case dsl.NodeTypeNamedFunctionDefinition:
-		return nil, fmt.Errorf("mlr: functions may only be declared at top level")
+		return nil, fmt.Errorf("functions may only be declared at top level")
 	case dsl.NodeTypeSubroutineDefinition:
-		return nil, fmt.Errorf("mlr: subroutines may only be declared at top level")
+		return nil, fmt.Errorf("subroutines may only be declared at top level")
 	case dsl.NodeTypeSubroutineCallsite:
 		return root.BuildSubroutineCallsiteNode(astNode)
 
diff --git a/pkg/dsl/cst/subroutines.go b/pkg/dsl/cst/subroutines.go
index 3f04de745..4f08cc4d3 100644
--- a/pkg/dsl/cst/subroutines.go
+++ b/pkg/dsl/cst/subroutines.go
@@ -1,10 +1,8 @@
-// ================================================================
 // CST build/execute for subroutine nodes.
 //
 // Subroutines can't be used as rvalues; their invocation must be the entire
 // statement. Nonetheless, their name-resolution, argument/parameter binding,
 // etc. are very similar to functions.
-// ================================================================
 
 package cst
 
@@ -13,7 +11,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/lib"
 )
 
-// ----------------------------------------------------------------
 // Subroutine lookup:
 //
 // * Unlike for functions, There are no built-in subroutines -- the only ones
@@ -71,8 +68,7 @@ func (root *RootNode) BuildSubroutineCallsiteNode(astNode *dsl.ASTNode) (IExecut
 		udsCallsiteNode := NewUDSCallsite(argumentNodes, uds)
 		root.rememberUnresolvedSubroutineCallsite(udsCallsiteNode)
 		return udsCallsiteNode, nil
-	} else {
-		udsCallsiteNode := NewUDSCallsite(argumentNodes, uds)
-		return udsCallsiteNode, nil
 	}
+	udsCallsiteNode := NewUDSCallsite(argumentNodes, uds)
+	return udsCallsiteNode, nil
 }
diff --git a/pkg/dsl/cst/tee.go b/pkg/dsl/cst/tee.go
index 7abcf4a04..13bb25429 100644
--- a/pkg/dsl/cst/tee.go
+++ b/pkg/dsl/cst/tee.go
@@ -1,6 +1,4 @@
-// ================================================================
 // This handles tee statements.
-// ================================================================
 
 package cst
 
@@ -15,7 +13,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ----------------------------------------------------------------
 // Examples:
 //   tee > "foo.dat", $*
 //   tee > stderr, $*
@@ -54,7 +51,6 @@ import (
 //         * full record "$*"
 //         * redirect pipe "|"
 //             * string literal "jq ."
-// ----------------------------------------------------------------
 
 type tTeeToRedirectFunc func(
 	outrec *mlrval.Mlrmap,
@@ -94,7 +90,7 @@ func (root *RootNode) BuildTeeStatementNode(astNode *dsl.ASTNode) (IExecutable,
 	lib.InternalCodingErrorIf(redirectorNode.Children == nil)
 	lib.InternalCodingErrorIf(len(redirectorNode.Children) != 1)
 	redirectorTargetNode := redirectorNode.Children[0]
-	var err error = nil
+	var err error
 
 	if redirectorTargetNode.Type == dsl.NodeTypeRedirectTargetStdout {
 		retval.teeToRedirectFunc = retval.teeToFileOrPipe
@@ -119,7 +115,7 @@ func (root *RootNode) BuildTeeStatementNode(astNode *dsl.ASTNode) (IExecutable,
 		} else if redirectorNode.Type == dsl.NodeTypeRedirectPipe {
 			retval.outputHandlerManager = output.NewPipeWriteHandlerManager(root.recordWriterOptions)
 		} else {
-			return nil, fmt.Errorf("mlr: unhandled redirector node type %s", string(redirectorNode.Type))
+			return nil, fmt.Errorf("unhandled redirector node type %s", string(redirectorNode.Type))
 		}
 	}
 
@@ -135,7 +131,7 @@ func (root *RootNode) BuildTeeStatementNode(astNode *dsl.ASTNode) (IExecutable,
 func (node *TeeStatementNode) Execute(state *runtime.State) (*BlockExitPayload, error) {
 	expression := node.expressionEvaluable.Evaluate(state)
 	if !expression.IsMap() {
-		return nil, fmt.Errorf("mlr: tee-evaluaiton yielded %s, not map", expression.GetTypeName())
+		return nil, fmt.Errorf("tee-evaluation yielded %s, not map", expression.GetTypeName())
 	}
 	err := node.teeToRedirectFunc(expression.GetMap(), state)
 	return nil, err
@@ -147,7 +143,7 @@ func (node *TeeStatementNode) teeToFileOrPipe(
 ) error {
 	redirectorTarget := node.redirectorTargetEvaluable.Evaluate(state)
 	if !redirectorTarget.IsString() {
-		return fmt.Errorf("mlr: output redirection yielded %s, not string", redirectorTarget.GetTypeName())
+		return fmt.Errorf("output redirection yielded %s, not string", redirectorTarget.GetTypeName())
 	}
 	outputFileName := redirectorTarget.String()
 
diff --git a/pkg/dsl/cst/types.go b/pkg/dsl/cst/types.go
index dea4861a6..251d8610e 100644
--- a/pkg/dsl/cst/types.go
+++ b/pkg/dsl/cst/types.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Main type definitions for CST build/execute
-// ================================================================
 
 package cst
 
@@ -12,7 +10,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/runtime"
 )
 
-// ----------------------------------------------------------------
 // DSLInstanceType is for minor differences in DSL handling between mlr put,
 // mlr filter, and mlr repl.
 //
@@ -33,7 +30,6 @@ const (
 	DSLInstanceTypeREPL
 )
 
-// ----------------------------------------------------------------
 // Please see root.go for context and comments.
 type RootNode struct {
 	beginBlocks                   []*StatementBlockNode
@@ -51,12 +47,10 @@ type RootNode struct {
 	strictMode                    bool
 }
 
-// ----------------------------------------------------------------
 // Many functions have this signature. This type-alias is for function-name
 // lookup tables.
 type NodeBuilder func(astNode *dsl.ASTNode) (IEvaluable, error)
 
-// ----------------------------------------------------------------
 // This is for all statements and statement blocks within the CST.
 type IExecutable interface {
 	Execute(state *runtime.State) (*BlockExitPayload, error)
@@ -64,7 +58,6 @@ type IExecutable interface {
 
 type Executor func(state *runtime.State) (*BlockExitPayload, error)
 
-// ================================================================
 // This is for any left-hand side (LHS or Lvalue) of an assignment statement.
 type IAssignable interface {
 	Assign(rvalue *mlrval.Mlrval, state *runtime.State) error
@@ -79,7 +72,6 @@ type IAssignable interface {
 	UnassignIndexed(indices []*mlrval.Mlrval, state *runtime.State)
 }
 
-// ================================================================
 // This is for any right-hand side (RHS or Rvalue) of an assignment statement.
 // Also, for computed field names on the left-hand side, like '$a . $b' in mlr
 // put '$[$a . $b]' = $x + $y'.
@@ -87,17 +79,14 @@ type IEvaluable interface {
 	Evaluate(state *runtime.State) *mlrval.Mlrval
 }
 
-// ================================================================
 // For blocks of statements: the main put/filter block; begin/end blocks;
 // for/while-loop bodies; user-defined functions/subroutines.
 
-// ----------------------------------------------------------------
 // Also implements IExecutable
 type StatementBlockNode struct {
 	executables []IExecutable
 }
 
-// ----------------------------------------------------------------
 // Things a block of statements can do:
 // * execute all the way to the end without a return
 // * break
diff --git a/pkg/dsl/cst/udf.go b/pkg/dsl/cst/udf.go
index ce6d65c71..8cc8023fc 100644
--- a/pkg/dsl/cst/udf.go
+++ b/pkg/dsl/cst/udf.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Support for user-defined functions
-// ================================================================
 
 package cst
 
@@ -194,7 +192,7 @@ func (site *UDFCallsite) Evaluate(
 		err := udf.signature.typeGatedParameterNames[i].Check(arguments[i])
 		if err != nil {
 			// TODO: put error-return in the Evaluate API
-			fmt.Fprint(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 	}
@@ -238,7 +236,7 @@ func (site *UDFCallsite) EvaluateWithArguments(
 		)
 		// TODO: put error-return in the Evaluate API
 		if err != nil {
-			fmt.Fprint(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 	}
@@ -262,7 +260,7 @@ func (site *UDFCallsite) EvaluateWithArguments(
 	if blockExitPayload == nil {
 		err = udf.signature.typeGatedReturnValue.Check(mlrval.ABSENT)
 		if err != nil {
-			fmt.Fprint(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 		return mlrval.ABSENT.StrictModeCheck(
@@ -277,7 +275,7 @@ func (site *UDFCallsite) EvaluateWithArguments(
 	if blockExitPayload.blockExitStatus != BLOCK_EXIT_RETURN_VALUE {
 		err = udf.signature.typeGatedReturnValue.Check(mlrval.ABSENT)
 		if err != nil {
-			fmt.Fprint(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 		return mlrval.ABSENT.StrictModeCheck(
@@ -293,7 +291,7 @@ func (site *UDFCallsite) EvaluateWithArguments(
 	err = udf.signature.typeGatedReturnValue.Check(blockExitPayload.blockReturnValue)
 	if err != nil {
 		// TODO: put error-return in the Evaluate API
-		fmt.Fprint(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -305,8 +303,6 @@ func (site *UDFCallsite) EvaluateWithArguments(
 	return blockExitPayload.blockReturnValue.Copy()
 }
 
-// ----------------------------------------------------------------
-
 // UDFManager tracks named UDFs like 'func f(a, b) { return b - a }'
 type UDFManager struct {
 	functions map[string]*UDF
@@ -319,24 +315,24 @@ func NewUDFManager() *UDFManager {
 	}
 }
 
-func (manager *UDFManager) Install(udf *UDF) {
-	manager.functions[udf.signature.funcOrSubrName] = udf
+func (mgr *UDFManager) Install(udf *UDF) {
+	mgr.functions[udf.signature.funcOrSubrName] = udf
 }
 
-func (manager *UDFManager) ExistsByName(name string) bool {
-	_, ok := manager.functions[name]
+func (mgr *UDFManager) ExistsByName(name string) bool {
+	_, ok := mgr.functions[name]
 	return ok
 }
 
 // LookUp is for callsites invoking UDFs whose names are known at CST-build time.
-func (manager *UDFManager) LookUp(functionName string, callsiteArity int) (*UDF, error) {
-	udf := manager.functions[functionName]
+func (mgr *UDFManager) LookUp(functionName string, callsiteArity int) (*UDF, error) {
+	udf := mgr.functions[functionName]
 	if udf == nil {
 		return nil, nil
 	}
 	if udf.signature.arity != callsiteArity {
 		return nil, fmt.Errorf(
-			"mlr: function %s invoked with %d argument%s; expected %d",
+			"function %s invoked with %d argument%s; expected %d",
 			functionName,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -348,11 +344,10 @@ func (manager *UDFManager) LookUp(functionName string, callsiteArity int) (*UDF,
 
 // LookUpDisregardingArity is used for evaluating right-hand sides of 'f = udf'
 // where f will be a local variable of type funct and udf is an existing UDF.
-func (manager *UDFManager) LookUpDisregardingArity(functionName string) *UDF {
-	return manager.functions[functionName] // nil if not found
+func (mgr *UDFManager) LookUpDisregardingArity(functionName string) *UDF {
+	return mgr.functions[functionName] // nil if not found
 }
 
-// ----------------------------------------------------------------
 // Example AST for UDF definition and callsite:
 
 // DSL EXPRESSION:
@@ -401,7 +396,7 @@ func (root *RootNode) BuildAndInstallUDF(astNode *dsl.ASTNode) error {
 
 	if BuiltinFunctionManagerInstance.LookUp(functionName) != nil {
 		return fmt.Errorf(
-			`mlr: function named "%s" must not override a built-in function of the same name`,
+			`function named "%s" must not override a built-in function of the same name`,
 			functionName,
 		)
 	}
@@ -409,7 +404,7 @@ func (root *RootNode) BuildAndInstallUDF(astNode *dsl.ASTNode) error {
 	if !root.allowUDFUDSRedefinitions {
 		if root.udfManager.ExistsByName(functionName) {
 			return fmt.Errorf(
-				`mlr: function named "%s" has already been defined`,
+				`function named "%s" has already been defined`,
 				functionName,
 			)
 		}
@@ -425,7 +420,6 @@ func (root *RootNode) BuildAndInstallUDF(astNode *dsl.ASTNode) error {
 	return nil
 }
 
-
 var namelessFunctionCounter int = 0
 
 // genFunctionLiteralName provides a UUID for function-literal nodes like `func (a, b) { return b - a }'.
@@ -435,8 +429,6 @@ func genFunctionLiteralName() string {
 	return fmt.Sprintf("function-literal-%06d", namelessFunctionCounter)
 }
 
-// ----------------------------------------------------------------
-
 // UnnamedUDFNode holds function literals like 'func (a, b) { return b - a }'.
 type UnnamedUDFNode struct {
 	udfAsMlrval *mlrval.Mlrval
@@ -463,8 +455,6 @@ func (node *UnnamedUDFNode) Evaluate(state *runtime.State) *mlrval.Mlrval {
 	return node.udfAsMlrval
 }
 
-// ================================================================
-
 // BuildUDF is for named UDFs, like `func f(a, b) { return b - a}', or,
 // unnamed UDFs like `func (a, b) { return b - a }'.
 func (root *RootNode) BuildUDF(
diff --git a/pkg/dsl/cst/uds.go b/pkg/dsl/cst/uds.go
index fcbcc08a0..858d953e3 100644
--- a/pkg/dsl/cst/uds.go
+++ b/pkg/dsl/cst/uds.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Support for user-defined subroutines
-// ================================================================
 
 package cst
 
@@ -166,14 +164,14 @@ func NewUDSManager() *UDSManager {
 	}
 }
 
-func (manager *UDSManager) LookUp(subroutineName string, callsiteArity int) (*UDS, error) {
-	uds := manager.subroutines[subroutineName]
+func (mgr *UDSManager) LookUp(subroutineName string, callsiteArity int) (*UDS, error) {
+	uds := mgr.subroutines[subroutineName]
 	if uds == nil {
 		return nil, nil
 	}
 	if uds.signature.arity != callsiteArity {
 		return nil, fmt.Errorf(
-			"mlr: subroutine %s invoked with %d argument%s; expected %d",
+			"subroutine %s invoked with %d argument%s; expected %d",
 			subroutineName,
 			callsiteArity,
 			lib.Plural(callsiteArity),
@@ -183,16 +181,15 @@ func (manager *UDSManager) LookUp(subroutineName string, callsiteArity int) (*UD
 	return uds, nil
 }
 
-func (manager *UDSManager) Install(uds *UDS) {
-	manager.subroutines[uds.signature.funcOrSubrName] = uds
+func (mgr *UDSManager) Install(uds *UDS) {
+	mgr.subroutines[uds.signature.funcOrSubrName] = uds
 }
 
-func (manager *UDSManager) ExistsByName(name string) bool {
-	_, ok := manager.subroutines[name]
+func (mgr *UDSManager) ExistsByName(name string) bool {
+	_, ok := mgr.subroutines[name]
 	return ok
 }
 
-// ----------------------------------------------------------------
 // Example AST for UDS definition and callsite:
 
 // DSL EXPRESSION:
@@ -241,7 +238,7 @@ func (root *RootNode) BuildAndInstallUDS(astNode *dsl.ASTNode) error {
 	if !root.allowUDFUDSRedefinitions {
 		if root.udsManager.ExistsByName(subroutineName) {
 			return fmt.Errorf(
-				`mlr: subroutine named "%s" has already been defined`,
+				`subroutine named "%s" has already been defined`,
 				subroutineName,
 			)
 		}
diff --git a/pkg/dsl/cst/validate.go b/pkg/dsl/cst/validate.go
index dc5c7e04a..49eb9ccc5 100644
--- a/pkg/dsl/cst/validate.go
+++ b/pkg/dsl/cst/validate.go
@@ -1,8 +1,6 @@
-// ================================================================
 // Checks for things that are syntax errors but not done in the AST for
 // pragmatic reasons. For example, $anything in begin/end blocks;
 // begin/end/func not at top level; etc.
-// ================================================================
 
 package cst
 
@@ -30,7 +28,7 @@ func ValidateAST(
 	// But filter '' is an error.
 	if len(ast.RootNode.Children) == 0 {
 		if dslInstanceType == DSLInstanceTypeFilter {
-			return fmt.Errorf("mlr: filter statement must not be empty")
+			return fmt.Errorf("filter statement must not be empty")
 		}
 	}
 
@@ -78,7 +76,7 @@ func validateASTAux(
 	if astNode.Type == dsl.NodeTypeFilterStatement {
 		if dslInstanceType == DSLInstanceTypeFilter {
 			return fmt.Errorf(
-				`mlr: filter expressions must not also contain the "filter" keyword`,
+				`filter expressions must not also contain the "filter" keyword`,
 			)
 		}
 	}
@@ -87,21 +85,21 @@ func validateASTAux(
 	if astNode.Type == dsl.NodeTypeBeginBlock {
 		if !atTopLevel {
 			return fmt.Errorf(
-				"mlr: begin blocks can only be at top level",
+				"begin blocks can only be at top level",
 			)
 		}
 		nextLevelInBeginOrEnd = true
 	} else if astNode.Type == dsl.NodeTypeEndBlock {
 		if !atTopLevel {
 			return fmt.Errorf(
-				"mlr: end blocks can only be at top level",
+				"end blocks can only be at top level",
 			)
 		}
 		nextLevelInBeginOrEnd = true
 	} else if astNode.Type == dsl.NodeTypeNamedFunctionDefinition {
 		if !atTopLevel {
 			return fmt.Errorf(
-				"mlr: func blocks can only be at top level",
+				"func blocks can only be at top level",
 			)
 		}
 		nextLevelInUDF = true
@@ -110,7 +108,7 @@ func validateASTAux(
 	} else if astNode.Type == dsl.NodeTypeSubroutineDefinition {
 		if !atTopLevel {
 			return fmt.Errorf(
-				"mlr: subr blocks can only be at top level",
+				"subr blocks can only be at top level",
 			)
 		}
 		nextLevelInUDS = true
@@ -132,7 +130,7 @@ func validateASTAux(
 			astNode.Type == dsl.NodeTypeIndirectFieldValue ||
 			astNode.Type == dsl.NodeTypeFullSrec {
 			return fmt.Errorf(
-				"mlr: begin/end blocks cannot refer to records via $x, $*, etc",
+				"begin/end blocks cannot refer to records via $x, $*, etc",
 			)
 		}
 	}
@@ -141,7 +139,7 @@ func validateASTAux(
 	if !inLoop {
 		if astNode.Type == dsl.NodeTypeBreak {
 			return fmt.Errorf(
-				"mlr: break statements are only valid within for/do/while loops",
+				"break statements are only valid within for/do/while loops",
 			)
 		}
 	}
@@ -149,7 +147,7 @@ func validateASTAux(
 	if !inLoop {
 		if astNode.Type == dsl.NodeTypeContinue {
 			return fmt.Errorf(
-				"mlr: break statements are only valid within for/do/while loops",
+				"break statements are only valid within for/do/while loops",
 			)
 		}
 	}
@@ -167,7 +165,7 @@ func validateASTAux(
 	if !inUDF && !inUDS {
 		if astNode.Type == dsl.NodeTypeReturn {
 			return fmt.Errorf(
-				"mlr: return statements are only valid within func/subr blocks",
+				"return statements are only valid within func/subr blocks",
 			)
 		}
 	}
@@ -177,14 +175,14 @@ func validateASTAux(
 		if inUDF {
 			if len(astNode.Children) != 1 {
 				return fmt.Errorf(
-					"mlr: return statements in func blocks must return a value",
+					"return statements in func blocks must return a value",
 				)
 			}
 		}
 		if inUDS {
 			if len(astNode.Children) != 0 {
 				return fmt.Errorf(
-					"mlr: return statements in subr blocks must not return a value",
+					"return statements in subr blocks must not return a value",
 				)
 			}
 		}
@@ -195,7 +193,7 @@ func validateASTAux(
 		ok := VALID_LHS_NODE_TYPES[astNode.Type]
 		if !ok {
 			return fmt.Errorf(
-				"mlr: %s is not valid on the left-hand side of an assignment",
+				"%s is not valid on the left-hand side of an assignment",
 				astNode.Type,
 			)
 		}
@@ -206,7 +204,7 @@ func validateASTAux(
 		ok := VALID_LHS_NODE_TYPES[astNode.Type]
 		if !ok {
 			return fmt.Errorf(
-				"mlr: %s is not valid for unset statement",
+				"%s is not valid for unset statement",
 				astNode.Type,
 			)
 		}
@@ -257,10 +255,9 @@ func validateForLoopTwoVariableUniqueNames(astNode *dsl.ASTNode) error {
 	keyVarName := string(keyVarNode.Token.Lit)
 	valVarName := string(valVarNode.Token.Lit)
 	if keyVarName == valVarName {
-		return fmt.Errorf("mlr: redefinition of variable %s in the same scope", keyVarName)
-	} else {
-		return nil
+		return fmt.Errorf("redefinition of variable %s in the same scope", keyVarName)
 	}
+	return nil
 }
 
 // Check against 'for ((a,a), b in $*)' or 'for ((a,b), a in $*)' -- repeated 'a'.
@@ -287,20 +284,19 @@ func validateForLoopMultivariableUniqueNames(astNode *dsl.ASTNode) error {
 		name := string(keyVarNode.Token.Lit)
 		_, present := seen[name]
 		if present {
-			return fmt.Errorf("mlr: redefinition of variable %s in the same scope", name)
+			return fmt.Errorf("redefinition of variable %s in the same scope", name)
 		}
 		seen[name] = true
 	}
 
 	valVarName := string(valVarNode.Token.Lit)
 	if seen[valVarName] {
-		return fmt.Errorf("mlr: redefinition of variable %s in the same scope", valVarName)
+		return fmt.Errorf("redefinition of variable %s in the same scope", valVarName)
 	}
 
 	return nil
 }
 
-
 var VALID_LHS_NODE_TYPES = map[dsl.TNodeType]bool{
 	dsl.NodeTypeArrayOrMapIndexAccess:           true,
 	dsl.NodeTypeDotOperator:                     true,
diff --git a/pkg/dsl/cst/warn.go b/pkg/dsl/cst/warn.go
index 75c5d0436..46f629412 100644
--- a/pkg/dsl/cst/warn.go
+++ b/pkg/dsl/cst/warn.go
@@ -1,9 +1,7 @@
-// ================================================================
 // Shows warnings for things like uninitialized variables. These are things
 // that are statically computable from the AST by itself -- it confines itself
 // to local-variable analysis. There are other uninitialization issues
 // detectable only at runtime, which would benefit from a 'strict mode'.
-// ================================================================
 
 package cst
 
@@ -15,7 +13,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/lib"
 )
 
-// ----------------------------------------------------------------
 // Returns true if there are no warnings.
 func WarnOnAST(
 	ast *dsl.AST,
@@ -37,7 +34,6 @@ func WarnOnAST(
 	return ok
 }
 
-// ----------------------------------------------------------------
 // Example ASTs:
 //
 // $ mlr -n put -v 'z = x + y'
@@ -181,7 +177,6 @@ func warnOnASTAux(
 	return ok
 }
 
-// ----------------------------------------------------------------
 // Given a func/subr block, find the names of its parameters.  All the
 // lib.InternalCodingErrorIf parts are shape-assertions to make sure this code
 // is in sync with the BNF grammar which builds the AST from a Miller-DSL
diff --git a/pkg/dsl/cst/while.go b/pkg/dsl/cst/while.go
index 536aa0490..5f2282c6a 100644
--- a/pkg/dsl/cst/while.go
+++ b/pkg/dsl/cst/while.go
@@ -1,6 +1,4 @@
-// ================================================================
 // This is for while/do-while loops
-// ================================================================
 
 package cst
 
@@ -58,7 +56,7 @@ func (node *WhileLoopNode) Execute(state *runtime.State) (*BlockExitPayload, err
 		boolValue, isBool := condition.GetBoolValue()
 		if !isBool {
 			return nil, fmt.Errorf(
-				"mlr: conditional expression did not evaluate to boolean%s",
+				"conditional expression did not evaluate to boolean%s",
 				dsl.TokenToLocationInfo(node.conditionToken),
 			)
 		}
@@ -153,7 +151,7 @@ func (node *DoWhileLoopNode) Execute(state *runtime.State) (*BlockExitPayload, e
 		boolValue, isBool := condition.GetBoolValue()
 		if !isBool {
 			return nil, fmt.Errorf(
-				"mlr: conditional expression did not evaluate to boolean%s",
+				"conditional expression did not evaluate to boolean%s",
 				dsl.TokenToLocationInfo(node.conditionToken),
 			)
 		}
diff --git a/pkg/dsl/token.go b/pkg/dsl/token.go
index 6808941d2..32eb3fd27 100644
--- a/pkg/dsl/token.go
+++ b/pkg/dsl/token.go
@@ -11,7 +11,6 @@ import (
 func TokenToLocationInfo(sourceToken *token.Token) string {
 	if sourceToken == nil {
 		return ""
-	} else {
-		return fmt.Sprintf(" at DSL expression line %d column %d", sourceToken.Pos.Line, sourceToken.Pos.Column)
 	}
+	return fmt.Sprintf(" at DSL expression line %d column %d", sourceToken.Pos.Line, sourceToken.Pos.Column)
 }
diff --git a/pkg/entrypoint/entrypoint.go b/pkg/entrypoint/entrypoint.go
index d8c56c8cf..21ee389cc 100644
--- a/pkg/entrypoint/entrypoint.go
+++ b/pkg/entrypoint/entrypoint.go
@@ -1,7 +1,5 @@
-// ================================================================
 // All the usual contents of main() are put into this package for ease of
 // testing.
-// ================================================================
 
 package entrypoint
 
@@ -43,7 +41,7 @@ func Main() MainReturn {
 
 	options, recordTransformers, err := climain.ParseCommandLine(os.Args)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, "mlr:", err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -53,7 +51,7 @@ func Main() MainReturn {
 		err = processFilesInPlace(options)
 	}
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "mlr: %v.\n", err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -62,17 +60,15 @@ func Main() MainReturn {
 	}
 }
 
-// ----------------------------------------------------------------
 // processToStdout is normal processing without mlr -I.
 
 func processToStdout(
 	options *cli.TOptions,
-	recordTransformers []transformers.IRecordTransformer,
+	recordTransformers []transformers.RecordTransformer,
 ) error {
 	return stream.Stream(options.FileNames, options, recordTransformers, os.Stdout, true)
 }
 
-// ----------------------------------------------------------------
 // processFilesInPlace is in-place processing without mlr -I.
 //
 // For in-place mode, reconstruct the transformers on each input file. E.g.
diff --git a/pkg/go-csv/csv_reader.go b/pkg/go-csv/csv_reader.go
index 5a0820a01..b09a2b558 100644
--- a/pkg/go-csv/csv_reader.go
+++ b/pkg/go-csv/csv_reader.go
@@ -53,13 +53,11 @@
 //	{`Multi-line
 //	field`, `comma is ,`}
 
-// ================================================================
 // MILLER-SPECIFIC UPDATE:
 // This is a bugfix as sketched at
 // https://github.com/golang/go/issues/39119
 // -- sadly, this fix was _not_ accepted within the standard library,
 // so we are left to fork and patch.
-// ================================================================
 
 package csv
 
diff --git a/pkg/input/pseudo_reader_gen.go b/pkg/input/pseudo_reader_gen.go
index d2fd8ec94..35ae99ff9 100644
--- a/pkg/input/pseudo_reader_gen.go
+++ b/pkg/input/pseudo_reader_gen.go
@@ -121,7 +121,7 @@ func (reader *PseudoReaderGen) tryParse(
 ) (*mlrval.Mlrval, error) {
 	mvalue := mlrval.FromDeferredType(svalue)
 	if mvalue == nil || !mvalue.IsNumeric() {
-		return nil, fmt.Errorf("mlr: gen: %s \"%s\" is not parseable as number", name, svalue)
+		return nil, fmt.Errorf("gen: %s \"%s\" is not parseable as number", name, svalue)
 	}
 	return mvalue, nil
 }
diff --git a/pkg/input/record_reader_csv.go b/pkg/input/record_reader_csv.go
index a389665ed..b13c8a979 100644
--- a/pkg/input/record_reader_csv.go
+++ b/pkg/input/record_reader_csv.go
@@ -198,7 +198,7 @@ func (reader *RecordReaderCSV) getRecordBatch(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 	dedupeFieldNames := reader.readerOptions.DedupeFieldNames
 
 	csvRecords, more := <-csvRecordsChannel
@@ -253,7 +253,7 @@ func (reader *RecordReaderCSV) getRecordBatch(
 		} else {
 			if !reader.readerOptions.AllowRaggedCSVInput {
 				err := fmt.Errorf(
-					"mlr: CSV header/data length mismatch %d != %d at filename %s row %d",
+					"CSV header/data length mismatch %d != %d at filename %s row %d",
 					nh, nd, reader.filename, reader.rowNumber,
 				)
 				errorChannel <- err
@@ -338,7 +338,6 @@ func (reader *RecordReaderCSV) maybeConsumeComment(
 	return false
 }
 
-// ----------------------------------------------------------------
 // BOM-stripping
 //
 // Some CSVs start with a "byte-order mark" which is the 3-byte sequence
diff --git a/pkg/input/record_reader_csvlite.go b/pkg/input/record_reader_csvlite.go
index d9a28ce5c..fb4e3ff1f 100644
--- a/pkg/input/record_reader_csvlite.go
+++ b/pkg/input/record_reader_csvlite.go
@@ -168,7 +168,7 @@ func getRecordBatchExplicitCSVHeader(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 	dedupeFieldNames := reader.readerOptions.DedupeFieldNames
 
 	lines, more := <-linesChannel
@@ -215,7 +215,7 @@ func getRecordBatchExplicitCSVHeader(
 		} else {
 			if !reader.readerOptions.AllowRaggedCSVInput && len(reader.headerStrings) != len(fields) {
 				err := fmt.Errorf(
-					"mlr: CSV header/data length mismatch %d != %d at filename %s line %d",
+					"CSV header/data length mismatch %d != %d at filename %s line %d",
 					len(reader.headerStrings), len(fields), filename, reader.inputLineNumber,
 				)
 				errorChannel <- err
@@ -290,7 +290,7 @@ func getRecordBatchImplicitCSVHeader(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 	dedupeFieldNames := reader.readerOptions.DedupeFieldNames
 
 	lines, more := <-linesChannel
@@ -338,7 +338,7 @@ func getRecordBatchImplicitCSVHeader(
 		} else {
 			if !reader.readerOptions.AllowRaggedCSVInput && len(reader.headerStrings) != len(fields) {
 				err := fmt.Errorf(
-					"mlr: CSV header/data length mismatch %d != %d at filename %s line %d",
+					"CSV header/data length mismatch %d != %d at filename %s line %d",
 					len(reader.headerStrings), len(fields), filename, reader.inputLineNumber,
 				)
 				errorChannel <- err
diff --git a/pkg/input/record_reader_dkvp_nidx.go b/pkg/input/record_reader_dkvp_nidx.go
index ec010606b..2e892c15c 100644
--- a/pkg/input/record_reader_dkvp_nidx.go
+++ b/pkg/input/record_reader_dkvp_nidx.go
@@ -125,7 +125,7 @@ func (reader *RecordReaderDKVPNIDX) getRecordBatch(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 
 	lines, more := <-linesChannel
 	if !more {
diff --git a/pkg/input/record_reader_json.go b/pkg/input/record_reader_json.go
index 108cc1372..959265aee 100644
--- a/pkg/input/record_reader_json.go
+++ b/pkg/input/record_reader_json.go
@@ -184,7 +184,6 @@ func (reader *RecordReaderJSON) processHandle(
 	}
 }
 
-// ================================================================
 // JSON comment-stripping
 //
 // Miller lets users (on an opt-in basis) have comments in their data files,
diff --git a/pkg/input/record_reader_pprint.go b/pkg/input/record_reader_pprint.go
index 45f0b3c54..5a9b48f2d 100644
--- a/pkg/input/record_reader_pprint.go
+++ b/pkg/input/record_reader_pprint.go
@@ -36,24 +36,23 @@ func NewRecordReaderPPRINT(
 		}
 		return reader, nil
 
-	} else {
-		// Use the CSVLite record-reader, which is implemented in another file,
-		// with multiple spaces instead of commas
-		reader := &RecordReaderCSVLite{
-			readerOptions:   readerOptions,
-			recordsPerBatch: recordsPerBatch,
-			fieldSplitter:   newFieldSplitter(readerOptions),
-
-			useVoidRep: true,
-			voidRep:    "-",
-		}
-		if reader.readerOptions.UseImplicitHeader {
-			reader.recordBatchGetter = getRecordBatchImplicitCSVHeader
-		} else {
-			reader.recordBatchGetter = getRecordBatchExplicitCSVHeader
-		}
-		return reader, nil
 	}
+	// Use the CSVLite record-reader, which is implemented in another file,
+	// with multiple spaces instead of commas
+	reader := &RecordReaderCSVLite{
+		readerOptions:   readerOptions,
+		recordsPerBatch: recordsPerBatch,
+		fieldSplitter:   newFieldSplitter(readerOptions),
+
+		useVoidRep: true,
+		voidRep:    "-",
+	}
+	if reader.readerOptions.UseImplicitHeader {
+		reader.recordBatchGetter = getRecordBatchImplicitCSVHeader
+	} else {
+		reader.recordBatchGetter = getRecordBatchExplicitCSVHeader
+	}
+	return reader, nil
 }
 
 type RecordReaderPprintBarredOrMarkdown struct {
@@ -172,7 +171,7 @@ func getRecordBatchExplicitPprintHeader(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 	dedupeFieldNames := reader.readerOptions.DedupeFieldNames
 
 	lines, more := <-linesChannel
@@ -238,7 +237,7 @@ func getRecordBatchExplicitPprintHeader(
 		} else {
 			if !reader.readerOptions.AllowRaggedCSVInput && len(reader.headerStrings) != len(fields) {
 				err := fmt.Errorf(
-					"mlr: PPRINT-barred header/data length mismatch %d != %d at filename %s line %d",
+					"PPRINT-barred header/data length mismatch %d != %d at filename %s line %d",
 					len(reader.headerStrings), len(fields), filename, reader.inputLineNumber,
 				)
 				errorChannel <- err
@@ -308,7 +307,7 @@ func getRecordBatchImplicitPprintHeader(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 	dedupeFieldNames := reader.readerOptions.DedupeFieldNames
 
 	lines, more := <-linesChannel
@@ -374,7 +373,7 @@ func getRecordBatchImplicitPprintHeader(
 		} else {
 			if !reader.readerOptions.AllowRaggedCSVInput && len(reader.headerStrings) != len(fields) {
 				err := fmt.Errorf(
-					"mlr: CSV header/data length mismatch %d != %d at filename %s line %d",
+					"CSV header/data length mismatch %d != %d at filename %s line %d",
 					len(reader.headerStrings), len(fields), filename, reader.inputLineNumber,
 				)
 				errorChannel <- err
diff --git a/pkg/input/record_reader_tsv.go b/pkg/input/record_reader_tsv.go
index fac255199..bc2f2463a 100644
--- a/pkg/input/record_reader_tsv.go
+++ b/pkg/input/record_reader_tsv.go
@@ -150,7 +150,7 @@ func getRecordBatchExplicitTSVHeader(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 	dedupeFieldNames := reader.readerOptions.DedupeFieldNames
 
 	lines, more := <-linesChannel
@@ -184,7 +184,7 @@ func getRecordBatchExplicitTSVHeader(
 		} else {
 			if !reader.readerOptions.AllowRaggedCSVInput && len(reader.headerStrings) != len(fields) {
 				err := fmt.Errorf(
-					"mlr: TSV header/data length mismatch %d != %d at filename %s line %d",
+					"TSV header/data length mismatch %d != %d at filename %s line %d",
 					len(reader.headerStrings), len(fields), filename, reader.inputLineNumber,
 				)
 				errorChannel <- err
@@ -255,7 +255,7 @@ func getRecordBatchImplicitTSVHeader(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 	dedupeFieldNames := reader.readerOptions.DedupeFieldNames
 
 	lines, more := <-linesChannel
@@ -303,7 +303,7 @@ func getRecordBatchImplicitTSVHeader(
 		} else {
 			if !reader.readerOptions.AllowRaggedCSVInput && len(reader.headerStrings) != len(fields) {
 				err := fmt.Errorf(
-					"mlr: TSV header/data length mismatch %d != %d at filename %s line %d",
+					"TSV header/data length mismatch %d != %d at filename %s line %d",
 					len(reader.headerStrings), len(fields), filename, reader.inputLineNumber,
 				)
 				errorChannel <- err
diff --git a/pkg/input/record_reader_xtab.go b/pkg/input/record_reader_xtab.go
index 679e7458c..a81c95aa8 100644
--- a/pkg/input/record_reader_xtab.go
+++ b/pkg/input/record_reader_xtab.go
@@ -38,8 +38,8 @@ type tStanza struct {
 
 func newStanza() *tStanza {
 	return &tStanza{
-		dataLines:    make([]string, 0),
-		commentLines: make([]string, 0),
+		dataLines:    []string{},
+		commentLines: []string{},
 	}
 }
 
@@ -157,7 +157,7 @@ func channelizedStanzaScanner(
 				done = true
 				break
 			} else {
-				fmt.Fprintf(os.Stderr, "mlr: %#v\n", err)
+				fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 				break
 			}
 		}
@@ -238,7 +238,7 @@ func (reader *RecordReaderXTAB) getRecordBatch(
 	recordsAndContexts []*types.RecordAndContext,
 	eof bool,
 ) {
-	recordsAndContexts = make([]*types.RecordAndContext, 0)
+	recordsAndContexts = []*types.RecordAndContext{}
 
 	stanzas, more := <-stanzasChannel
 	if !more {
@@ -295,9 +295,8 @@ func (reader *RecordReaderXTAB) recordFromXTABLines(
 func newXTABPairSplitter(options *cli.TReaderOptions) iXTABPairSplitter {
 	if options.IPSRegex == nil {
 		return &tXTABIPSSplitter{ips: options.IPS, ipslen: len(options.IPS)}
-	} else {
-		return &tXTABIPSRegexSplitter{ipsRegex: options.IPSRegex}
 	}
+	return &tXTABIPSRegexSplitter{ipsRegex: options.IPSRegex}
 }
 
 type tXTABIPSSplitter struct {
@@ -371,7 +370,6 @@ func (s *tXTABIPSRegexSplitter) Split(input string) (key, value string, err erro
 		return kv[0], "", nil
 	} else if len(kv) == 2 {
 		return kv[0], kv[1], nil
-	} else {
-		return "", "", fmt.Errorf("internal coding error in XTAB reader")
 	}
+	return "", "", fmt.Errorf("internal coding error in XTAB reader")
 }
diff --git a/pkg/input/splitters.go b/pkg/input/splitters.go
index 5e24e0b73..db44445e2 100644
--- a/pkg/input/splitters.go
+++ b/pkg/input/splitters.go
@@ -20,9 +20,8 @@ type iPairSplitter interface {
 func newPairSplitter(options *cli.TReaderOptions) iPairSplitter {
 	if options.IPSRegex == nil {
 		return &tIPSSplitter{ips: options.IPS}
-	} else {
-		return &tIPSRegexSplitter{ipsRegex: options.IPSRegex}
 	}
+	return &tIPSRegexSplitter{ipsRegex: options.IPSRegex}
 }
 
 type tIPSSplitter struct {
@@ -50,9 +49,8 @@ type iFieldSplitter interface {
 func newFieldSplitter(options *cli.TReaderOptions) iFieldSplitter {
 	if options.IFSRegex == nil {
 		return &tIFSSplitter{ifs: options.IFS, allowRepeatIFS: options.AllowRepeatIFS}
-	} else {
-		return &tIFSRegexSplitter{ifsRegex: options.IFSRegex}
 	}
+	return &tIFSRegexSplitter{ifsRegex: options.IFSRegex}
 }
 
 type tIFSSplitter struct {
diff --git a/pkg/lib/file_readers.go b/pkg/lib/file_readers.go
index dc169d84b..20d8a77e0 100644
--- a/pkg/lib/file_readers.go
+++ b/pkg/lib/file_readers.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Wrapper for os.Open which maps string filename to *os.File, which in turn
 // implements io.ReadCloser, and optional in turn wrapping that in a
 // gzip/zlib/bunzip2 reader. Shared across record-readers for all the various
@@ -15,7 +14,6 @@
 // If a prepipe is specified, it is used; else if an encoding is specified, it
 // is used; otherwise the file suffix (.bz2, .gz, .z) is consulted; otherwise
 // the file is treated as text.
-// ================================================================
 
 package lib
 
@@ -56,13 +54,12 @@ func OpenFileForRead(
 ) (io.ReadCloser, error) {
 	if prepipe != "" {
 		return openPrepipedHandleForRead(filename, prepipe, prepipeIsRaw)
-	} else {
-		handle, err := PathToHandle(filename)
-		if err != nil {
-			return nil, err
-		}
-		return openEncodedHandleForRead(handle, encoding, filename)
 	}
+	handle, err := PathToHandle(filename)
+	if err != nil {
+		return nil, err
+	}
+	return openEncodedHandleForRead(handle, encoding, filename)
 }
 
 // PathToHandle maps various back-ends to a stream. As of 2021-07-07, the
@@ -82,9 +79,8 @@ func PathToHandle(
 		return handle, err
 	} else if strings.HasPrefix(path, "file://") {
 		return os.Open(strings.Replace(path, "file://", "", 1))
-	} else {
-		return os.Open(path)
 	}
+	return os.Open(path)
 }
 
 // OpenStdin: if prepipe is non-empty, popens "{prepipe}" and returns a handle
@@ -99,9 +95,8 @@ func OpenStdin(
 ) (io.ReadCloser, error) {
 	if prepipe != "" {
 		return openPrepipedHandleForRead("", prepipe, prepipeIsRaw)
-	} else {
-		return openEncodedHandleForRead(os.Stdin, encoding, "")
 	}
+	return openEncodedHandleForRead(os.Stdin, encoding, "")
 }
 
 func openPrepipedHandleForRead(
@@ -147,9 +142,8 @@ func escapeFileNameForPopen(filename string) string {
 	}
 	if foundQuoteOrSpace {
 		return "'" + buffer.String() + "'"
-	} else {
-		return buffer.String()
 	}
+	return buffer.String()
 }
 
 // TODO: comment
@@ -188,7 +182,6 @@ func openEncodedHandleForRead(
 	return handle, nil
 }
 
-// ----------------------------------------------------------------
 // BZip2ReadCloser remedies the fact that bzip2.NewReader does not implement io.ReadCloser.
 type BZip2ReadCloser struct {
 	originalHandle io.ReadCloser
@@ -210,7 +203,6 @@ func (rc *BZip2ReadCloser) Close() error {
 	return rc.originalHandle.Close()
 }
 
-// ----------------------------------------------------------------
 // ZstdReadCloser remedies the fact that zstd.NewReader does not implement io.ReadCloser.
 type ZstdReadCloser struct {
 	originalHandle io.ReadCloser
@@ -236,8 +228,6 @@ func (rc *ZstdReadCloser) Close() error {
 	return rc.originalHandle.Close()
 }
 
-// ----------------------------------------------------------------
-
 // IsEOF handles the following problem: reading past end of files opened with
 // os.Open returns the error which is io.EOF. Reading past close of pipes
 // opened with popen (e.g.  Miller's prepipe, where the file isn't 'foo.dat'
@@ -251,12 +241,10 @@ func IsEOF(err error) bool {
 		return true
 	} else if strings.Contains(err.Error(), "file already closed") {
 		return true
-	} else {
-		return false
 	}
+	return false
 }
 
-// ----------------------------------------------------------------
 // Functions for in-place mode
 
 // IsUpdateableInPlace tells if we can use the input with mlr -I: not for URLs,
diff --git a/pkg/lib/getoptify.go b/pkg/lib/getoptify.go
index 1979742af..55d9d31aa 100644
--- a/pkg/lib/getoptify.go
+++ b/pkg/lib/getoptify.go
@@ -18,7 +18,7 @@ func Getoptify(inargs []string) []string {
 	expandRegex := regexp.MustCompile("^-[a-zA-Z0-9]+$")
 	splitRegex := regexp.MustCompile("^--[^=]+=.+$")
 	numberRegex := regexp.MustCompile("^-[0-9]+$")
-	outargs := make([]string, 0)
+	outargs := []string{}
 	for _, inarg := range inargs {
 		if expandRegex.MatchString(inarg) {
 			if numberRegex.MatchString(inarg) {
diff --git a/pkg/lib/halfpipe.go b/pkg/lib/halfpipe.go
index 3b926ef3f..edf95e354 100644
--- a/pkg/lib/halfpipe.go
+++ b/pkg/lib/halfpipe.go
@@ -85,7 +85,7 @@ func OpenInboundHalfPipe(commandString string) (*os.File, error) {
 	go func(process *os.Process, readPipe *os.File) {
 		_, err := process.Wait()
 		if err != nil {
-			fmt.Fprintf(os.Stderr, "%s: %v\n", "mlr", err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		}
 		readPipe.Close()
 	}(process, readPipe)
diff --git a/pkg/lib/latin1_test.go b/pkg/lib/latin1_test.go
index 947d0f042..398648f71 100644
--- a/pkg/lib/latin1_test.go
+++ b/pkg/lib/latin1_test.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Most Miller tests (thousands of them) are command-line-driven via
 // mlr regtest. Here are some cases needing special focus.
-// ================================================================
 
 package lib
 
diff --git a/pkg/lib/mlrmath.go b/pkg/lib/mlrmath.go
index 96a05b928..fb625974c 100644
--- a/pkg/lib/mlrmath.go
+++ b/pkg/lib/mlrmath.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Non-mlrval math routines
-// ================================================================
 
 package lib
 
@@ -10,7 +8,6 @@ import (
 	"os"
 )
 
-// ----------------------------------------------------------------
 // Some wrappers around things which aren't one-liners from math.*.
 
 func Sgn(a float64) float64 {
@@ -20,9 +17,8 @@ func Sgn(a float64) float64 {
 		return -1.0
 	} else if a == 0 {
 		return 0.0
-	} else {
-		return math.NaN()
 	}
+	return math.NaN()
 }
 
 // Normal cumulative distribution function, expressed in terms of erfc library
@@ -92,7 +88,6 @@ func Invqnorm(x float64) float64 {
 const JACOBI_TOLERANCE = 1e-12
 const JACOBI_MAXITER = 20
 
-// ----------------------------------------------------------------
 // Jacobi real-symmetric eigensolver. Loosely adapted from Numerical Recipes.
 //
 // Note: this is coded for n=2 (to implement PCA linear regression on 2
@@ -252,7 +247,6 @@ func matmul2t(
 	}
 }
 
-// ================================================================
 // Logisitic regression
 //
 // Real-valued x_0 .. x_{N-1}
diff --git a/pkg/lib/ordered_map.go b/pkg/lib/ordered_map.go
index d03dc6c12..3de42d732 100644
--- a/pkg/lib/ordered_map.go
+++ b/pkg/lib/ordered_map.go
@@ -1,9 +1,7 @@
-// ================================================================
 // ORDERED MAP FROM STRING TO GENERIC VALUE TYPE
 //
 // Quite like types.OrderedMap but only with string keys. See orderedMap.go for
 // more information.
-// ================================================================
 
 package lib
 
@@ -30,7 +28,6 @@ func NewOrderedMap[V any]() *OrderedMap[V] {
 	}
 }
 
-// ----------------------------------------------------------------
 // Value-copy is up to the caller -- PutReference and PutCopy
 // are in the public OrderedMap API.
 func newOrderedMapEntry[V any](key *string, value V) *orderedMapEntry[V] {
@@ -53,14 +50,13 @@ func (omap *OrderedMap[V]) Has(key string) bool {
 func (omap *OrderedMap[V]) findEntry(key *string) *orderedMapEntry[V] {
 	if omap.keysToEntries != nil {
 		return omap.keysToEntries[*key]
-	} else {
-		for pe := omap.Head; pe != nil; pe = pe.Next {
-			if pe.Key == *key {
-				return pe
-			}
-		}
-		return nil
 	}
+	for pe := omap.Head; pe != nil; pe = pe.Next {
+		if pe.Key == *key {
+			return pe
+		}
+	}
+	return nil
 }
 
 func (omap *OrderedMap[V]) Put(key string, value V) {
@@ -106,16 +102,14 @@ func (omap *OrderedMap[V]) GetWithCheck(key string) (V, bool) {
 	return pe.Value, true
 }
 
-// ----------------------------------------------------------------
 // Returns true if it was found and removed
 func (omap *OrderedMap[V]) Remove(key string) bool {
 	pe := omap.findEntry(&key)
 	if pe == nil {
 		return false
-	} else {
-		omap.unlink(pe)
-		return true
 	}
+	omap.unlink(pe)
+	return true
 }
 
 func (omap *OrderedMap[V]) unlink(pe *orderedMapEntry[V]) {
diff --git a/pkg/lib/paragraph.go b/pkg/lib/paragraph.go
index b608461a2..bac388be7 100644
--- a/pkg/lib/paragraph.go
+++ b/pkg/lib/paragraph.go
@@ -37,7 +37,7 @@ func PrintWordsAsParagraph(words []string) {
 // For online help contexts like printing all the built-in DSL functions, or
 // the list of all verbs. Max width is nominally 80.
 func FormatAsParagraph(text string, maxWidth int) []string {
-	lines := make([]string, 0)
+	lines := []string{}
 	words := strings.Fields(text)
 
 	separator := " "
diff --git a/pkg/lib/rand.go b/pkg/lib/rand.go
index 5a5fe0e71..672f5e6e6 100644
--- a/pkg/lib/rand.go
+++ b/pkg/lib/rand.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Thinly wraps Go's rand library, with seed-function support
-// ================================================================
 
 package lib
 
@@ -34,9 +32,8 @@ func RandInt63() int64 {
 func RandRange(lowInclusive, highExclusive int64) int64 {
 	if lowInclusive == highExclusive {
 		return lowInclusive
-	} else {
-		u := generator.Int63()
-		// TODO: test divide-by-zero cases in UT
-		return lowInclusive + (u % (highExclusive - lowInclusive))
 	}
+	u := generator.Int63()
+	// TODO: test divide-by-zero cases in UT
+	return lowInclusive + (u % (highExclusive - lowInclusive))
 }
diff --git a/pkg/lib/readfiles.go b/pkg/lib/readfiles.go
index 6eaaa0d17..4c73af54a 100644
--- a/pkg/lib/readfiles.go
+++ b/pkg/lib/readfiles.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Routines for loading strings from files. Nominally for the put/filter verbs
 // to load DSL strings from .mlr files.
-// ================================================================
 
 package lib
 
@@ -23,13 +21,12 @@ func LoadStringsFromFileOrDir(path string, extension string) ([]string, error) {
 	}
 	if fileInfo.IsDir() {
 		return LoadStringsFromDir(path, extension)
+	}
+	dslString, err := LoadStringFromFile(path)
+	if err != nil {
+		return nil, err
 	} else {
-		dslString, err := LoadStringFromFile(path)
-		if err != nil {
-			return nil, err
-		} else {
-			return []string{dslString}, nil
-		}
+		return []string{dslString}, nil
 	}
 }
 
@@ -48,7 +45,7 @@ func LoadStringFromFile(filename string) (string, error) {
 // will load /u/myfiles/foo.mlr and /u/myfiles/bar.mlr but will skip over
 // /u/myfiles/data.csv and /u/myfiles/todo.txt.
 func LoadStringsFromDir(dirname string, extension string) ([]string, error) {
-	dslStrings := make([]string, 0)
+	dslStrings := []string{}
 
 	f, err := os.Open(dirname)
 	if err != nil {
diff --git a/pkg/lib/regex.go b/pkg/lib/regex.go
index b810a4b01..b9be0012e 100644
--- a/pkg/lib/regex.go
+++ b/pkg/lib/regex.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Support for regular expressions in Miller.
 //
 // * By and large we use the Go library.
@@ -31,7 +30,6 @@
 //   o "regex" is used for regular-expression strings following Miller's idiosyncratic syntax and
 //     semantics as described above.
 //
-// ================================================================
 
 package lib
 
@@ -132,7 +130,7 @@ func CompileMillerRegex(regexString string) (*regexp.Regexp, error) {
 func CompileMillerRegexOrDie(regexString string) *regexp.Regexp {
 	regex, err := CompileMillerRegex(regexString)
 	if err != nil {
-		fmt.Fprint(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 	return regex
@@ -154,10 +152,9 @@ func CompileMillerRegexesOrDie(regexStrings []string) []*regexp.Regexp {
 // but "" splits to [""] when I wish it were []. This function does the latter.
 func RegexCompiledSplitString(regex *regexp.Regexp, input string, n int) []string {
 	if input == "" {
-		return make([]string, 0)
-	} else {
-		return regex.Split(input, n)
+		return []string{}
 	}
+	return regex.Split(input, n)
 }
 
 // RegexStringSub implements the sub DSL function.
@@ -475,9 +472,8 @@ func ReplacementHasCaptures(
 ) {
 	if captureDetector.MatchString(replacement) {
 		return true, captureSplitter.FindAllStringSubmatchIndex(replacement, -1)
-	} else {
-		return false, nil
 	}
+	return false, nil
 }
 
 // InterpolateCaptures example:
diff --git a/pkg/lib/regex_test.go b/pkg/lib/regex_test.go
index 23ec95bf1..cd45cb2d5 100644
--- a/pkg/lib/regex_test.go
+++ b/pkg/lib/regex_test.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Most Miller tests (thousands of them) are command-line-driven via
 // mlr regtest. Here are some cases needing special focus.
-// ================================================================
 
 package lib
 
diff --git a/pkg/lib/stats.go b/pkg/lib/stats.go
index 1418f7533..8eb08beff 100644
--- a/pkg/lib/stats.go
+++ b/pkg/lib/stats.go
@@ -1,7 +1,5 @@
-// ================================================================
 // These are intended for streaming (i.e. single-pass) applications. Otherwise
 // the formulas look different (and are more intuitive).
-// ================================================================
 
 package lib
 
@@ -9,9 +7,7 @@ import (
 	"math"
 )
 
-// ----------------------------------------------------------------
 // Univariate linear regression
-// ----------------------------------------------------------------
 // There are N (xi, yi) pairs.
 //
 // minimize E = sum (yi - m xi - b)^2
@@ -84,8 +80,6 @@ func GetLinearRegressionOLS(
 //
 //	output = [m, b, math.sqrt(var_m), math.sqrt(var_b)]
 
-// ----------------------------------------------------------------
-
 // GetVar is the finalizing function for computing variance from streamed
 // accumulator values.
 func GetVar(
@@ -104,7 +98,6 @@ func GetVar(
 	return numerator / denominator
 }
 
-// ----------------------------------------------------------------
 // Unbiased estimator:
 //    (1/n)   sum{(xi-mean)**3}
 //  -----------------------------
@@ -127,9 +120,6 @@ func GetVar(
 //   = sumx2 - 2 n mean^2 + n mean^2
 //   = sumx2 - n mean^2
 
-// ----------------------------------------------------------------
-
-// ----------------------------------------------------------------
 // Unbiased:
 //  (1/n) sum{(x-mean)**4}
 //  ----------------------- - 3
@@ -144,7 +134,6 @@ func GetVar(
 //   = sumx4 - mean*(4 sumx3 - 6 mean sumx2 + 3 n mean^3)
 //   = sumx4 - mean*(4 sumx3 - mean*(6 sumx2 - 3 n mean^2))
 
-// ----------------------------------------------------------------
 // Non-streaming implementation:
 //
 // def find_sample_covariance(xs, ys):
@@ -193,7 +182,6 @@ func GetCovMatrix(
 	return Q
 }
 
-// ----------------------------------------------------------------
 // Principal component analysis can be used for linear regression:
 //
 // * Compute the covariance matrix for the x's and y's.
@@ -217,25 +205,25 @@ func GetCovMatrix(
 // appropriate when the x's and the y's are thought to both have errors.
 
 func GetLinearRegressionPCA(
-	eigenvalue_1 float64,
-	eigenvalue_2 float64,
-	eigenvector_1 [2]float64,
-	eigenvector_2 [2]float64,
-	x_mean float64,
-	y_mean float64,
+	eigenvalue1 float64,
+	eigenvalue2 float64,
+	eigenvector1 [2]float64,
+	eigenvector2 [2]float64,
+	xMean float64,
+	yMean float64,
 ) (m, b, quality float64) {
 
-	abs_1 := math.Abs(eigenvalue_1)
-	abs_2 := math.Abs(eigenvalue_2)
+	abs1 := math.Abs(eigenvalue1)
+	abs2 := math.Abs(eigenvalue2)
 	quality = 1.0
-	if abs_1 == 0.0 {
+	if abs1 == 0.0 {
 		quality = 0.0
-	} else if abs_2 > 0.0 {
-		quality = 1.0 - abs_2/abs_1
+	} else if abs2 > 0.0 {
+		quality = 1.0 - abs2/abs1
 	}
-	a0 := eigenvector_1[0]
-	a1 := eigenvector_1[1]
+	a0 := eigenvector1[0]
+	a1 := eigenvector1[1]
 	m = a1 / a0
-	b = y_mean - m*x_mean
+	b = yMean - m*xMean
 	return m, b, quality
 }
diff --git a/pkg/lib/time.go b/pkg/lib/time.go
index 8ceae8760..da8bf8abe 100644
--- a/pkg/lib/time.go
+++ b/pkg/lib/time.go
@@ -167,12 +167,10 @@ func epochSecondsToTime(epochSeconds float64, doLocal bool, location *time.Locat
 	if doLocal {
 		if location == nil {
 			return time.Unix(intPart, decimalPart).Local()
-		} else {
-			return time.Unix(intPart, decimalPart).In(location)
 		}
-	} else {
-		return time.Unix(intPart, decimalPart).UTC()
+		return time.Unix(intPart, decimalPart).In(location)
 	}
+	return time.Unix(intPart, decimalPart).UTC()
 }
 
 func epochNanosecondsToTime(epochNanoseconds int64, doLocal bool, location *time.Location) time.Time {
@@ -181,10 +179,8 @@ func epochNanosecondsToTime(epochNanoseconds int64, doLocal bool, location *time
 	if doLocal {
 		if location == nil {
 			return time.Unix(intPart, fractionalPart).Local()
-		} else {
-			return time.Unix(intPart, fractionalPart).In(location)
 		}
-	} else {
-		return time.Unix(intPart, fractionalPart).UTC()
+		return time.Unix(intPart, fractionalPart).In(location)
 	}
+	return time.Unix(intPart, fractionalPart).UTC()
 }
diff --git a/pkg/lib/time_test.go b/pkg/lib/time_test.go
index 587a09c7a..fd5055f97 100644
--- a/pkg/lib/time_test.go
+++ b/pkg/lib/time_test.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Most Miller tests (thousands of them) are command-line-driven via
 // mlr regtest. Here are some cases needing special focus.
-// ================================================================
 
 package lib
 
diff --git a/pkg/lib/unbackslash.go b/pkg/lib/unbackslash.go
index f5e411a46..19c54f09c 100644
--- a/pkg/lib/unbackslash.go
+++ b/pkg/lib/unbackslash.go
@@ -1,6 +1,4 @@
-// ================================================================
 // See cst.BuildStringLiteralNode for more context.
-// ================================================================
 
 package lib
 
diff --git a/pkg/lib/unbackslash_test.go b/pkg/lib/unbackslash_test.go
index 3bc0a10fa..1ece986ea 100644
--- a/pkg/lib/unbackslash_test.go
+++ b/pkg/lib/unbackslash_test.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Most Miller tests (thousands of them) are command-line-driven via
 // mlr regtest. Here are some cases needing special focus.
-// ================================================================
 
 package lib
 
diff --git a/pkg/lib/util.go b/pkg/lib/util.go
index f37194ccb..1fe8d628e 100644
--- a/pkg/lib/util.go
+++ b/pkg/lib/util.go
@@ -16,17 +16,15 @@ func BooleanXOR(a, b bool) bool {
 func BoolToInt(b bool) int64 {
 	if !b {
 		return 0
-	} else {
-		return 1
 	}
+	return 1
 }
 
 func Plural(n int) string {
 	if n == 1 {
 		return ""
-	} else {
-		return "s"
 	}
+	return "s"
 }
 
 // In Go as in all languages I'm aware of with a string-split, "a,b,c" splits
@@ -34,10 +32,9 @@ func Plural(n int) string {
 // but "" splits to [""] when I wish it were []. This function does the latter.
 func SplitString(input string, separator string) []string {
 	if input == "" {
-		return make([]string, 0)
-	} else {
-		return strings.Split(input, separator)
+		return []string{}
 	}
+	return strings.Split(input, separator)
 }
 
 func StringListToSet(stringList []string) map[string]bool {
@@ -52,44 +49,43 @@ func StringListToSet(stringList []string) map[string]bool {
 	return stringSet
 }
 
-func SortStrings(strings []string) {
+func SortStrings(strs []string) {
 	// Go sort API: for ascending sort, return true if element i < element j.
-	sort.Slice(strings, func(i, j int) bool {
-		return strings[i] < strings[j]
+	sort.Slice(strs, func(i, j int) bool {
+		return strs[i] < strs[j]
 	})
 }
 
-func ReverseStringList(strings []string) {
-	n := len(strings)
+func ReverseStringList(strs []string) {
+	n := len(strs)
 	i := 0
 	j := n - 1
 	for i < j {
-		temp := strings[i]
-		strings[i] = strings[j]
-		strings[j] = temp
+		temp := strs[i]
+		strs[i] = strs[j]
+		strs[j] = temp
 		i++
 		j--
 	}
 }
 
-func SortedStrings(strings []string) []string {
-	copy := make([]string, len(strings))
-	for i, s := range strings {
-		copy[i] = s
+func SortedStrings(strs []string) []string {
+	result := make([]string, len(strs))
+	for i, s := range strs {
+		result[i] = s
 	}
 	// Go sort API: for ascending sort, return true if element i < element j.
-	sort.Slice(copy, func(i, j int) bool {
-		return copy[i] < copy[j]
+	sort.Slice(result, func(i, j int) bool {
+		return result[i] < result[j]
 	})
-	return copy
+	return result
 }
 
 func IntMin2(a, b int64) int64 {
 	if a < b {
 		return a
-	} else {
-		return b
 	}
+	return b
 }
 
 // TryIntFromString tries decimal, hex, octal, and binary.
@@ -153,19 +149,18 @@ func TryFloatFromString(input string) (float64, bool) {
 	fval, err := strconv.ParseFloat(input, 64)
 	if err == nil {
 		return fval, true
-	} else {
-		return 0, false
 	}
+	return 0, false
 }
 
 func TryBoolFromBoolString(input string) (bool, bool) {
 	if input == "true" {
 		return true, true
-	} else if input == "false" {
-		return false, true
-	} else {
-		return false, false
 	}
+	if input == "false" {
+		return false, true
+	}
+	return false, false
 }
 
 // Go doesn't preserve insertion order in its arrays, so here we make an
diff --git a/pkg/mlrval/mlrmap.go b/pkg/mlrval/mlrmap.go
index b10f30fd8..a20542c5c 100644
--- a/pkg/mlrval/mlrmap.go
+++ b/pkg/mlrval/mlrmap.go
@@ -1,11 +1,9 @@
-// ================================================================
 // ORDERED MAP FROM STRING TO MLRVAL
 //
 // This is an implementation of insertion-ordered key-value pairs for Miller's
 // fundamental record data structure. It's also an ordered-map data structure,
 // suitable for Miller JSON decode/encode.
 //
-// ----------------------------------------------------------------
 // DESIGN
 //
 // * It keeps a doubly-linked list of key-value pairs.
@@ -29,7 +27,6 @@
 // This may be useful in certain contexts, even though it's not the default
 // chosen for stream-records.
 //
-// ----------------------------------------------------------------
 // MOTIVATION
 //
 // * The use case for records in Miller is that *all* fields are read from
@@ -53,7 +50,6 @@
 //
 // * Added benefit: the field-rename operation (preserving field order) becomes
 //   trivial.
-// ================================================================
 
 package mlrval
 
@@ -99,9 +95,8 @@ type MlrmapPair struct {
 func NewMlrmapAsRecord() *Mlrmap {
 	if hashRecords {
 		return newMlrmapHashed()
-	} else {
-		return newMlrmapUnhashed()
 	}
+	return newMlrmapUnhashed()
 }
 func NewMlrmap() *Mlrmap {
 	return newMlrmapHashed()
@@ -131,16 +126,14 @@ func newMlrmapHashed() *Mlrmap {
 func NewMlrmapMaybeHashed(wantHashing bool) *Mlrmap {
 	if wantHashing {
 		return newMlrmapHashed()
-	} else {
-		return newMlrmapUnhashed()
 	}
+	return newMlrmapUnhashed()
 }
 
 func (mlrmap *Mlrmap) isHashed() bool {
 	return mlrmap.keysToEntries != nil
 }
 
-// ----------------------------------------------------------------
 // Value-copy is up to the caller -- PutReference and PutCopy
 // are in the public Mlrmap API.
 func newMlrmapEntry(key string, value *Mlrval) *MlrmapEntry {
diff --git a/pkg/mlrval/mlrmap_accessors.go b/pkg/mlrval/mlrmap_accessors.go
index 04cb59373..793f52199 100644
--- a/pkg/mlrval/mlrmap_accessors.go
+++ b/pkg/mlrval/mlrmap_accessors.go
@@ -21,9 +21,8 @@ func (mlrmap *Mlrmap) Get(key string) *Mlrval {
 	pe := mlrmap.findEntry(key)
 	if pe == nil {
 		return nil
-	} else {
-		return pe.Value
 	}
+	return pe.Value
 }
 
 // PutReference copies the key but not the value. This is not safe for DSL use,
@@ -162,29 +161,28 @@ func (mlrmap *Mlrmap) PutReferenceAfter(
 		mlrmap.FieldCount++
 		return pf
 
-	} else {
-		// Before: ... pe pg ...
-		// After:  ... pe pf pg ...
-		//
-		// New entry is neither the new head (pe != nil) nor the new tail
-		// (pe.Next != nil, otherwise we'd be in the if-branch above).
-
-		pf := newMlrmapEntry(key, value)
-		pg := pe.Next
-
-		pe.Next = pf
-		pf.Next = pg
-		pf.Prev = pe
-		if pg != nil {
-			pg.Prev = pf
-		}
-
-		if mlrmap.keysToEntries != nil {
-			mlrmap.keysToEntries[key] = pf
-		}
-		mlrmap.FieldCount++
-		return pf
 	}
+	// Before: ... pe pg ...
+	// After:  ... pe pf pg ...
+	//
+	// New entry is neither the new head (pe != nil) nor the new tail
+	// (pe.Next != nil, otherwise we'd be in the if-branch above).
+
+	pf := newMlrmapEntry(key, value)
+	pg := pe.Next
+
+	pe.Next = pf
+	pf.Next = pg
+	pf.Prev = pe
+	if pg != nil {
+		pg.Prev = pf
+	}
+
+	if mlrmap.keysToEntries != nil {
+		mlrmap.keysToEntries[key] = pf
+	}
+	mlrmap.FieldCount++
+	return pf
 }
 
 // findEntry is the basic hash-map accessor for Has, Put, Get, Remove, etc.
@@ -194,14 +192,13 @@ func (mlrmap *Mlrmap) PutReferenceAfter(
 func (mlrmap *Mlrmap) findEntry(key string) *MlrmapEntry {
 	if mlrmap.keysToEntries != nil {
 		return mlrmap.keysToEntries[key]
-	} else {
-		for pe := mlrmap.Head; pe != nil; pe = pe.Next {
-			if pe.Key == key {
-				return pe
-			}
-		}
-		return nil
 	}
+	for pe := mlrmap.Head; pe != nil; pe = pe.Next {
+		if pe.Key == key {
+			return pe
+		}
+	}
+	return nil
 }
 
 // findEntryByPositionalIndex is for '$[1]' etc. in the DSL.
@@ -244,18 +241,16 @@ func (mlrmap *Mlrmap) PutCopyWithMlrvalIndex(key *Mlrval, value *Mlrval) error {
 	if key.IsStringOrInt() {
 		mlrmap.PutCopy(key.String(), value)
 		return nil
-	} else {
-		return fmt.Errorf(
-			"mlr: record/map indices must be string, int, or array thereof; got %s", key.GetTypeName(),
-		)
 	}
+	return fmt.Errorf(
+		"record/map indices must be string, int, or array thereof; got %s", key.GetTypeName(),
+	)
 }
 
 func (mlrmap *Mlrmap) PrependCopy(key string, value *Mlrval) {
 	mlrmap.PrependReference(key, value.Copy())
 }
 
-// ----------------------------------------------------------------
 // Merges that into mlrmap.
 func (mlrmap *Mlrmap) Merge(other *Mlrmap) {
 	for pe := other.Head; pe != nil; pe = pe.Next {
@@ -263,7 +258,6 @@ func (mlrmap *Mlrmap) Merge(other *Mlrmap) {
 	}
 }
 
-// ----------------------------------------------------------------
 // Exposed for the 'nest' verb
 func (mlrmap *Mlrmap) GetEntry(key string) *MlrmapEntry {
 	return mlrmap.findEntry(key)
@@ -283,7 +277,7 @@ func (mlrmap *Mlrmap) GetKeys() []string {
 // specified are to be passed in as a map from string to bool, as Go
 // doesn't have hash-sets.
 func (mlrmap *Mlrmap) GetKeysExcept(exceptions map[string]bool) []string {
-	keys := make([]string, 0)
+	keys := []string{}
 	for pe := mlrmap.Head; pe != nil; pe = pe.Next {
 		if _, present := exceptions[pe.Key]; !present {
 			keys = append(keys, pe.Key)
@@ -292,7 +286,6 @@ func (mlrmap *Mlrmap) GetKeysExcept(exceptions map[string]bool) []string {
 	return keys
 }
 
-// ----------------------------------------------------------------
 // TODO: put error-return into this API
 func (mlrmap *Mlrmap) PutNameWithPositionalIndex(position int64, name *Mlrval) {
 	positionalEntry := mlrmap.findEntryByPositionalIndex(position)
@@ -339,9 +332,8 @@ func (mlrmap *Mlrmap) GetWithPositionalIndex(position int64) *Mlrval {
 func (mlrmap *Mlrmap) GetWithMlrvalIndex(index *Mlrval) (*Mlrval, error) {
 	if index.IsArray() {
 		return mlrmap.getWithMlrvalArrayIndex(index)
-	} else {
-		return mlrmap.getWithMlrvalSingleIndex(index)
 	}
+	return mlrmap.getWithMlrvalSingleIndex(index)
 }
 
 // This lets the user do '$y = $x[ ["a", "b", "c"] ]' in lieu of
@@ -359,7 +351,7 @@ func (mlrmap *Mlrmap) getWithMlrvalArrayIndex(index *Mlrval) (*Mlrval, error) {
 		}
 		if i < n-1 {
 			if !next.IsMap() {
-				return nil, fmt.Errorf("mlr: cannot multi-index non-map")
+				return nil, fmt.Errorf("cannot multi-index non-map")
 			}
 			current = next.intf.(*Mlrmap)
 		} else {
@@ -375,11 +367,10 @@ func (mlrmap *Mlrmap) getWithMlrvalSingleIndex(index *Mlrval) (*Mlrval, error) {
 		return mlrmap.Get(index.printrep), nil
 	} else if index.IsInt() {
 		return mlrmap.Get(index.String()), nil
-	} else {
-		return nil, fmt.Errorf(
-			"record/map indices must be string, int, or array thereof; got %s", index.GetTypeName(),
-		)
 	}
+	return nil, fmt.Errorf(
+		"record/map indices must be string, int, or array thereof; got %s", index.GetTypeName(),
+	)
 }
 
 // For '$[[1]]' etc. in the DSL.
@@ -400,7 +391,6 @@ func (mlrmap *Mlrmap) GetNameAtPositionalIndex(position int64) (string, bool) {
 	return mapEntry.Key, true
 }
 
-// ----------------------------------------------------------------
 // Copies the key and value (deep-copying in case the value is array/map).
 // This is safe for DSL use. See also PutReference.
 
@@ -476,10 +466,9 @@ func (mlrmap *Mlrmap) Remove(key string) bool {
 	pe := mlrmap.findEntry(key)
 	if pe == nil {
 		return false
-	} else {
-		mlrmap.Unlink(pe)
-		return true
 	}
+	mlrmap.Unlink(pe)
+	return true
 }
 
 func (mlrmap *Mlrmap) MoveToHead(key string) {
@@ -498,7 +487,6 @@ func (mlrmap *Mlrmap) MoveToTail(key string) {
 	}
 }
 
-// ----------------------------------------------------------------
 // E.g. '$name[1]["foo"] = "bar"' or '$*["foo"][1] = "bar"'
 // In the former case the indices are ["name", 1, "foo"] and in the latter case
 // the indices are ["foo", 1]. See also indexed-lvalues.md.
@@ -542,7 +530,6 @@ func (mlrmap *Mlrmap) GetValuesJoined() string {
 	return buffer.String()
 }
 
-// ----------------------------------------------------------------
 // For group-by in several transformers.  If the record is 'a=x,b=y,c=3,d=4,e=5' and
 // selectedFieldNames is 'a,b,c' then values are 'x,y,3'. This is returned as a
 // comma-joined string.  The boolean ok is false if not all selected field
@@ -658,7 +645,6 @@ func (mlrmap *Mlrmap) HasSelectedKeys(selectedFieldNames []string) bool {
 	return true
 }
 
-// ----------------------------------------------------------------
 // For mlr nest implode across records.
 func (mlrmap *Mlrmap) GetKeysJoinedExcept(px *MlrmapEntry) string {
 	var buffer bytes.Buffer
@@ -796,7 +782,6 @@ func (mlrmap *Mlrmap) SortByKeyRecursively() {
 	*mlrmap = *other
 }
 
-// ----------------------------------------------------------------
 // Only checks to see if the first entry is a map. For emit/emitp.
 func (mlrmap *Mlrmap) IsNested() bool {
 	if mlrmap.Head == nil {
@@ -804,12 +789,10 @@ func (mlrmap *Mlrmap) IsNested() bool {
 	} else if mlrmap.Head.Value.GetMap() == nil {
 		//TODO: check IsArrayOrMap()
 		return false
-	} else {
-		return true
 	}
+	return true
 }
 
-// ================================================================
 // PRIVATE METHODS
 
 func (mlrmap *Mlrmap) Unlink(pe *MlrmapEntry) {
@@ -876,15 +859,12 @@ func (mlrmap *Mlrmap) linkAtTail(pe *MlrmapEntry) {
 func (mlrmap *Mlrmap) pop() *MlrmapEntry {
 	if mlrmap.Head == nil {
 		return nil
-	} else {
-		pe := mlrmap.Head
-		mlrmap.Unlink(pe)
-		return pe
 	}
+	pe := mlrmap.Head
+	mlrmap.Unlink(pe)
+	return pe
 }
 
-// ----------------------------------------------------------------
-
 // ToPairsArray is used for sorting maps by key/value/etc, e.g. the sortmf DSL function.
 func (mlrmap *Mlrmap) ToPairsArray() []MlrmapPair {
 	pairsArray := make([]MlrmapPair, mlrmap.FieldCount)
@@ -908,8 +888,6 @@ func MlrmapFromPairsArray(pairsArray []MlrmapPair) *Mlrmap {
 	return mlrmap
 }
 
-// ----------------------------------------------------------------
-
 // GetFirstPair returns the first key-value pair as its own map.  If the map is
 // empty (i.e. there is no first pair) it returns nil.
 func (mlrmap *Mlrmap) GetFirstPair() *Mlrmap {
diff --git a/pkg/mlrval/mlrmap_flatten_unflatten.go b/pkg/mlrval/mlrmap_flatten_unflatten.go
index 4e5d117d2..b8cf3e568 100644
--- a/pkg/mlrval/mlrmap_flatten_unflatten.go
+++ b/pkg/mlrval/mlrmap_flatten_unflatten.go
@@ -1,4 +1,3 @@
-// ================================================================
 // FLATTEN/UNFLATTEN
 //
 // These are used by the flatten/unflatten verbs and DSL functions.  They are
@@ -18,7 +17,6 @@
 //
 // The former are used implicitly (i.e. unless the user explicitly requests
 // otherwise) when we convert to/from JSON.
-// ================================================================
 
 package mlrval
 
@@ -28,7 +26,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/lib"
 )
 
-// ----------------------------------------------------------------
 // Flattens all field values in the record. This is a special case of
 // FlattenFields but it's worth its own special case (to avoid iffing on the
 // nullity of the fieldNameSet) since the flatten/unflatten check is done by
@@ -62,7 +59,6 @@ func (mlrmap *Mlrmap) Flatten(separator string) {
 	*mlrmap = *other
 }
 
-// ----------------------------------------------------------------
 // For mlr flatten -f.
 
 func (mlrmap *Mlrmap) FlattenFields(
@@ -89,7 +85,6 @@ func (mlrmap *Mlrmap) FlattenFields(
 	*mlrmap = *other
 }
 
-// ----------------------------------------------------------------
 // Optimization for Flatten, to avoid needless data motion in the case
 // where all field values are non-collections.
 
@@ -102,7 +97,6 @@ func (mlrmap *Mlrmap) isFlattenable() bool {
 	return false
 }
 
-// ----------------------------------------------------------------
 // For mlr unflatten without -f. This undoes Unflatten.  This is for conversion
 // from non-JSON to JSON.  If there are fields x.a, x.b, x.c, etc. they're put
 // into a single field x with map-valued value keyed by "a", "b", "c".
@@ -192,7 +186,6 @@ func (mlrmap *Mlrmap) CopyUnflattened(
 	return other
 }
 
-// ----------------------------------------------------------------
 // For mlr unflatten -f. See comments on Unflatten. Largely copypasta of
 // Unflatten, but split out separately since Flatten needn't check a
 // fieldNameSet.
@@ -247,7 +240,6 @@ func (mlrmap *Mlrmap) CopyUnflattenFields(
 	return other
 }
 
-// ----------------------------------------------------------------
 // Flatten of empty map and empty array produce "{}" and "[]" as special cases.
 // (Without this, key-spreading would cause such fields to disappear entirely:
 // the field "x" -> {"a": 1, "b": 2} would spread to the pair of fields "x:a"
@@ -263,7 +255,7 @@ func unflattenTerminal(input *Mlrval) *Mlrval {
 		return FromMap(NewMlrmap())
 	}
 	if input.printrep == "[]" {
-		return FromArray(make([]*Mlrval, 0))
+		return FromArray([]*Mlrval{})
 	}
 	return input
 }
diff --git a/pkg/mlrval/mlrmap_json.go b/pkg/mlrval/mlrmap_json.go
index 5cd2c7422..a6581672a 100644
--- a/pkg/mlrval/mlrmap_json.go
+++ b/pkg/mlrval/mlrmap_json.go
@@ -1,6 +1,4 @@
-// ================================================================
 // See mlrval_json.go for details. This is the unmarshal/marshal solely for Mlrmap.
-// ================================================================
 
 package mlrval
 
@@ -50,10 +48,9 @@ func (mlrmap *Mlrmap) marshalJSONAux(
 		return mlrmap.marshalJSONAuxMultiline(jsonFormatting, elementNestingDepth, outputIsStdout)
 	} else if jsonFormatting == JSON_SINGLE_LINE {
 		return mlrmap.marshalJSONAuxSingleLine(jsonFormatting, elementNestingDepth, outputIsStdout)
-	} else {
-		lib.InternalCodingErrorIf(true)
-		return "", nil // not reached
 	}
+	lib.InternalCodingErrorIf(true)
+	return "", nil // not reached
 }
 
 func (mlrmap *Mlrmap) marshalJSONAuxMultiline(
@@ -145,7 +142,6 @@ func (mlrmap *Mlrmap) marshalJSONAuxSingleLine(
 	return buffer.String(), nil
 }
 
-// ----------------------------------------------------------------
 // JSON-stringifies a single field of a record
 func (entry *MlrmapEntry) JSONStringifyInPlace(
 	jsonFormatting TJSONFormatting,
@@ -158,7 +154,6 @@ func (entry *MlrmapEntry) JSONStringifyInPlace(
 	}
 }
 
-// ----------------------------------------------------------------
 // JSON-parses a single field of a record
 func (entry *MlrmapEntry) JSONParseInPlace() {
 	input := entry.Value.String()
diff --git a/pkg/mlrval/mlrmap_print.go b/pkg/mlrval/mlrmap_print.go
index 06306e08a..e98fd8eb5 100644
--- a/pkg/mlrval/mlrmap_print.go
+++ b/pkg/mlrval/mlrmap_print.go
@@ -26,14 +26,12 @@ func (mlrmap *Mlrmap) ToNIDXString() string {
 	return buffer.String()
 }
 
-// ----------------------------------------------------------------
 // Must have non-pointer receiver in order to implement the fmt.Stringer
 // interface to make mlrmap printable via fmt.Println et al.
 func (mlrmap Mlrmap) String() string {
 	bytes, err := mlrmap.MarshalJSON(JSON_MULTILINE, false)
 	if err != nil {
 		return "Mlrmap: could not not marshal self to JSON"
-	} else {
-		return string(bytes) + "\n"
 	}
+	return string(bytes) + "\n"
 }
diff --git a/pkg/mlrval/mlrval_accessors.go b/pkg/mlrval/mlrval_accessors.go
index ef3e498e8..1cc1352f4 100644
--- a/pkg/mlrval/mlrval_accessors.go
+++ b/pkg/mlrval/mlrval_accessors.go
@@ -9,9 +9,8 @@ import (
 func (mv *Mlrval) GetArrayLength() (int, bool) {
 	if mv.IsArray() {
 		return len(mv.intf.([]*Mlrval)), true
-	} else {
-		return -999, false
 	}
+	return -999, false
 }
 
 func CopyMlrvalArray(input []*Mlrval) []*Mlrval {
@@ -26,7 +25,6 @@ func CopyMlrvalArray(input []*Mlrval) []*Mlrval {
 	return output
 }
 
-// ---------------------------------------------------------------
 // For the flatten verb and DSL function.
 
 func (mv *Mlrval) FlattenToMap(prefix string, delimiter string) Mlrval {
diff --git a/pkg/mlrval/mlrval_cmp.go b/pkg/mlrval/mlrval_cmp.go
index f631420a2..9a85eba82 100644
--- a/pkg/mlrval/mlrval_cmp.go
+++ b/pkg/mlrval/mlrval_cmp.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Boolean expressions for ==, !=, >, >=, <, <=, <=> on Mlrvals.
 //
 // Note that in bifs/boolean.go we have similar functions which take pairs of
@@ -7,7 +6,6 @@
 // is they don't allocate memory, and so are more efficient for sort we don't
 // want to trigger lots of allocations, nor garbage collection, if we can avoid
 // it.
-// ================================================================
 
 // TODO: comment about mvtype; deferral; copying of deferrence.
 
@@ -24,7 +22,6 @@ type CmpFuncBool func(input1, input2 *Mlrval) bool
 // ties on field 1 so we can know whether to compare on field 2 or not.
 type CmpFuncInt func(input1, input2 *Mlrval) int // -1, 0, 1 for <=>
 
-// ----------------------------------------------------------------
 // Exported methods
 
 func Equals(input1, input2 *Mlrval) bool {
@@ -49,7 +46,6 @@ func Cmp(input1, input2 *Mlrval) int {
 	return cmp_dispositions[input1.Type()][input2.Type()](input1, input2)
 }
 
-// ----------------------------------------------------------------
 // Support routines for disposition-matrix entries
 
 // _same returns int 0 as a binary-input function
@@ -100,7 +96,6 @@ func string_cmp(a, b string) int {
 	return 0
 }
 
-// ----------------------------------------------------------------
 // Disposition-matrix entries
 
 func cmp_b_ss(input1, input2 *Mlrval) int {
diff --git a/pkg/mlrval/mlrval_cmp_test.go b/pkg/mlrval/mlrval_cmp_test.go
index 151083449..047f5bfa4 100644
--- a/pkg/mlrval/mlrval_cmp_test.go
+++ b/pkg/mlrval/mlrval_cmp_test.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Tests mlrval comparator functions
-// ================================================================
 
 package mlrval
 
diff --git a/pkg/mlrval/mlrval_collections.go b/pkg/mlrval/mlrval_collections.go
index e549e9ffb..48cefd7fd 100644
--- a/pkg/mlrval/mlrval_collections.go
+++ b/pkg/mlrval/mlrval_collections.go
@@ -1,4 +1,3 @@
-// ================================================================
 // ABOUT ARRAY/MAP INDEXING
 //
 // Arrays:
@@ -64,7 +63,6 @@
 // * Inside this file I say 'zindex' for the 0-up Go indices and 'mindex'
 //   for 1-up Miller indices.
 //
-// ================================================================
 
 package mlrval
 
@@ -75,7 +73,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/lib"
 )
 
-// ================================================================
 // TODO: copy-reduction refactor
 func (mv *Mlrval) ArrayGet(mindex *Mlrval) Mlrval {
 	if !mv.IsArray() {
@@ -88,18 +85,16 @@ func (mv *Mlrval) ArrayGet(mindex *Mlrval) Mlrval {
 	value := arrayGetAliased(&arrayval, int(mindex.intf.(int64)))
 	if value == nil {
 		return *ABSENT
-	} else {
-		return *value
 	}
+	return *value
 }
 
 func arrayGetAliased(array *[]*Mlrval, mindex int) *Mlrval {
 	zindex, ok := UnaliasArrayIndex(array, mindex)
 	if ok {
 		return (*array)[zindex]
-	} else {
-		return nil
 	}
+	return nil
 }
 
 func UnaliasArrayIndex(array *[]*Mlrval, mindex int) (int, bool) {
@@ -144,23 +139,19 @@ func UnaliasArrayLengthIndex(n int, mindex int) (int, bool) {
 		zindex := mindex - 1
 		if mindex <= n { // in bounds
 			return zindex, true
-		} else { // out of bounds
-			return zindex, false
-		}
+		} // out of bounds
+		return zindex, false
 	} else if mindex <= -1 {
 		zindex := mindex + n
 		if -n <= mindex { // in bounds
 			return zindex, true
-		} else { // out of bounds
-			return zindex, false
-		}
-	} else {
-		// mindex is 0
-		return -1, false
+		} // out of bounds
+		return zindex, false
 	}
+	// mindex is 0
+	return -1, false
 }
 
-// ----------------------------------------------------------------
 // TODO: thinking about capacity-resizing
 func (mv *Mlrval) ArrayAppend(value *Mlrval) {
 	if !mv.IsArray() {
@@ -205,7 +196,6 @@ func (mv *Mlrval) MapPut(key *Mlrval, value *Mlrval) {
 	// Silent no-ops are not good UX ...
 }
 
-// ----------------------------------------------------------------
 // This is a multi-level map/array put.
 //
 // E.g. '$name[1]["foo"] = "bar"' or '$*["foo"][1] = "bar"' In the former case
@@ -253,26 +243,24 @@ func (mv *Mlrval) PutIndexed(indices []*Mlrval, rvalue *Mlrval) error {
 		mv.intf = arrayval
 		return retval
 
+	}
+	baseIndex := indices[0]
+	if baseIndex.IsString() {
+		*mv = *FromEmptyMap()
+		return putIndexedOnMap(mv.intf.(*Mlrmap), indices, rvalue)
+	} else if baseIndex.IsInt() {
+		*mv = *FromEmptyArray()
+		arrayval := mv.intf.([]*Mlrval)
+		retval := putIndexedOnArray(&arrayval, indices, rvalue)
+		mv.intf = arrayval
+		return retval
 	} else {
-		baseIndex := indices[0]
-		if baseIndex.IsString() {
-			*mv = *FromEmptyMap()
-			return putIndexedOnMap(mv.intf.(*Mlrmap), indices, rvalue)
-		} else if baseIndex.IsInt() {
-			*mv = *FromEmptyArray()
-			arrayval := mv.intf.([]*Mlrval)
-			retval := putIndexedOnArray(&arrayval, indices, rvalue)
-			mv.intf = arrayval
-			return retval
-		} else {
-			return errors.New(
-				"mlr: only maps and arrays are indexable; got " + mv.GetTypeName(),
-			)
-		}
+		return errors.New(
+			"only maps and arrays are indexable; got " + mv.GetTypeName(),
+		)
 	}
 }
 
-// ----------------------------------------------------------------
 // Helper function for Mlrval.PutIndexed, for mlrvals of map type.
 func putIndexedOnMap(baseMap *Mlrmap, indices []*Mlrval, rvalue *Mlrval) error {
 	numIndices := len(indices)
@@ -301,7 +289,7 @@ func putIndexedOnMap(baseMap *Mlrmap, indices []*Mlrval, rvalue *Mlrval) error {
 	if !baseIndex.IsString() && !baseIndex.IsInt() {
 		// Base is map, index is invalid type
 		return errors.New(
-			"mlr: map indices must be string, int, or array thereof; got " + baseIndex.GetTypeName(),
+			"map indices must be string, int, or array thereof; got " + baseIndex.GetTypeName(),
 		)
 	}
 
@@ -310,7 +298,7 @@ func putIndexedOnMap(baseMap *Mlrmap, indices []*Mlrval, rvalue *Mlrval) error {
 		// Create a new level in order to recurse from
 		nextIndex := indices[1]
 
-		var err error = nil
+		var err error
 		baseValue, err = NewMlrvalForAutoDeepen(nextIndex.Type())
 		if err != nil {
 			return err
@@ -320,7 +308,6 @@ func putIndexedOnMap(baseMap *Mlrmap, indices []*Mlrval, rvalue *Mlrval) error {
 	return baseValue.PutIndexed(indices[1:], rvalue)
 }
 
-// ----------------------------------------------------------------
 // Helper function for Mlrval.PutIndexed, for mlrvals of array type.
 func putIndexedOnArray(
 	baseArray *[]*Mlrval,
@@ -345,51 +332,51 @@ func putIndexedOnArray(
 		// If last index, then assign.
 		if inBounds {
 			(*baseArray)[zindex] = rvalue.Copy()
-		} else if mindex.intf.(int64) == 0 {
-			return errors.New("mlr: zero indices are not supported. Indices are 1-up")
-		} else if mindex.intf.(int64) < 0 {
-			return errors.New("mlr: Cannot use negative indices to auto-lengthen arrays")
-		} else {
-			// Array is [a,b,c] with mindices 1,2,3. Length is 3. Zindices are 0,1,2.
-			// Given mindex is 4.
-			LengthenMlrvalArray(baseArray, int(mindex.intf.(int64)))
-			zindex := mindex.intf.(int64) - 1
-			(*baseArray)[zindex] = rvalue.Copy()
+			return nil
 		}
+		if mindex.intf.(int64) == 0 {
+			return errors.New("zero indices are not supported. Indices are 1-up")
+		}
+		if mindex.intf.(int64) < 0 {
+			return errors.New("Cannot use negative indices to auto-lengthen arrays")
+		}
+		// Array is [a,b,c] with mindices 1,2,3. Length is 3. Zindices are 0,1,2.
+		// Given mindex is 4.
+		LengthenMlrvalArray(baseArray, int(mindex.intf.(int64)))
+		zindex := mindex.intf.(int64) - 1
+		(*baseArray)[zindex] = rvalue.Copy()
 		return nil
+	}
+	// More indices remain; recurse
+	if inBounds {
+		nextIndex := indices[1]
 
-	} else {
-		// More indices remain; recurse
-		if inBounds {
-			nextIndex := indices[1]
-
-			// Overwrite what's in this slot if it's the wrong type
-			if nextIndex.IsString() {
-				if !(*baseArray)[zindex].IsMap() {
-					(*baseArray)[zindex] = FromEmptyMap()
-				}
-			} else if nextIndex.IsInt() {
-				if !(*baseArray)[zindex].IsArray() {
-					(*baseArray)[zindex] = FromEmptyArray()
-				}
-			} else {
-				return errors.New(
-					"mlr: indices must be string, int, or array thereof; got " + nextIndex.GetTypeName(),
-				)
+		// Overwrite what's in this slot if it's the wrong type
+		if nextIndex.IsString() {
+			if !(*baseArray)[zindex].IsMap() {
+				(*baseArray)[zindex] = FromEmptyMap()
+			}
+		} else if nextIndex.IsInt() {
+			if !(*baseArray)[zindex].IsArray() {
+				(*baseArray)[zindex] = FromEmptyArray()
 			}
-
-			return (*baseArray)[zindex].PutIndexed(indices[1:], rvalue)
-
-		} else if mindex.intf.(int64) == 0 {
-			return errors.New("mlr: zero indices are not supported. Indices are 1-up")
-		} else if mindex.intf.(int64) < 0 {
-			return errors.New("mlr: Cannot use negative indices to auto-lengthen arrays")
 		} else {
-			// Already allocated but needs to be longer
-			LengthenMlrvalArray(baseArray, int(mindex.intf.(int64)))
-			zindex := mindex.intf.(int64) - 1
-			return (*baseArray)[zindex].PutIndexed(indices[1:], rvalue)
+			return errors.New(
+				"indices must be string, int, or array thereof; got " + nextIndex.GetTypeName(),
+			)
 		}
+
+		return (*baseArray)[zindex].PutIndexed(indices[1:], rvalue)
+
+	} else if mindex.intf.(int64) == 0 {
+		return errors.New("zero indices are not supported. Indices are 1-up")
+	} else if mindex.intf.(int64) < 0 {
+		return errors.New("Cannot use negative indices to auto-lengthen arrays")
+	} else {
+		// Already allocated but needs to be longer
+		LengthenMlrvalArray(baseArray, int(mindex.intf.(int64)))
+		zindex := mindex.intf.(int64) - 1
+		return (*baseArray)[zindex].PutIndexed(indices[1:], rvalue)
 	}
 }
 
@@ -405,14 +392,12 @@ func (mv *Mlrval) RemoveIndexed(indices []*Mlrval) error {
 		mv.intf = arrayval
 		return retval
 
-	} else {
-		return errors.New(
-			"mlr: cannot unset index variable which is neither map nor array",
-		)
 	}
+	return errors.New(
+		"cannot unset index variable which is neither map nor array",
+	)
 }
 
-// ----------------------------------------------------------------
 // Helper function for Mlrval.RemoveIndexed, for mlrvals of map type.
 func removeIndexedOnMap(baseMap *Mlrmap, indices []*Mlrval) error {
 	numIndices := len(indices)
@@ -424,12 +409,11 @@ func removeIndexedOnMap(baseMap *Mlrmap, indices []*Mlrval) error {
 		if baseIndex.IsString() || baseIndex.IsInt() {
 			baseMap.Remove(baseIndex.String())
 			return nil
-		} else {
-			return errors.New(
-				"mlr: map indices must be string, int, or array thereof; got " +
-					baseIndex.GetTypeName(),
-			)
 		}
+		return errors.New(
+			"map indices must be string, int, or array thereof; got " +
+				baseIndex.GetTypeName(),
+		)
 	}
 
 	// If not last index, then recurse.
@@ -443,14 +427,13 @@ func removeIndexedOnMap(baseMap *Mlrmap, indices []*Mlrval) error {
 	} else {
 		// Base is map, index is invalid type
 		return errors.New(
-			"mlr: map indices must be string, int, or array thereof; got " + baseIndex.GetTypeName(),
+			"map indices must be string, int, or array thereof; got " + baseIndex.GetTypeName(),
 		)
 	}
 
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Helper function for Mlrval.PutIndexed, for mlrvals of array type.
 func removeIndexedOnArray(
 	baseArray *[]*Mlrval,
@@ -476,28 +459,24 @@ func removeIndexedOnArray(
 			rightSlice := (*baseArray)[zindex+1 : len((*baseArray))]
 			*baseArray = append(leftSlice, rightSlice...)
 		} else if mindex.intf.(int64) == 0 {
-			return errors.New("mlr: zero indices are not supported. Indices are 1-up")
-		} else {
-			// TODO: improve wording
-			return errors.New("mlr: array index out of bounds for unset")
+			return errors.New("zero indices are not supported. Indices are 1-up")
 		}
+		// TODO: improve wording
+		return errors.New("array index out of bounds for unset")
+	}
+	// More indices remain; recurse
+	if inBounds {
+		return (*baseArray)[zindex].RemoveIndexed(indices[1:])
+	} else if mindex.intf.(int64) == 0 {
+		return errors.New("zero indices are not supported. Indices are 1-up")
 	} else {
-		// More indices remain; recurse
-		if inBounds {
-			return (*baseArray)[zindex].RemoveIndexed(indices[1:])
-		} else if mindex.intf.(int64) == 0 {
-			return errors.New("mlr: zero indices are not supported. Indices are 1-up")
-		} else {
-			// TODO: improve wording
-			return errors.New("mlr: array index out of bounds for unset")
-		}
-
+		// TODO: improve wording
+		return errors.New("array index out of bounds for unset")
 	}
 
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Nominally for TopKeeper
 
 type BsearchMlrvalArrayFunc func(
@@ -543,9 +522,8 @@ func BsearchMlrvalArrayForDescendingInsert(
 				return lo
 			} else if GreaterThanOrEquals(value, (*array)[hi]) {
 				return hi
-			} else {
-				return hi + 1
 			}
+			return hi + 1
 		}
 		mid = newmid
 	}
@@ -590,9 +568,8 @@ func BsearchMlrvalArrayForAscendingInsert(
 				return lo
 			} else if LessThanOrEquals(value, (*array)[hi]) {
 				return hi
-			} else {
-				return hi + 1
 			}
+			return hi + 1
 		}
 		mid = newmid
 	}
@@ -612,11 +589,10 @@ func NewMlrvalForAutoDeepen(mvtype MVType) (*Mlrval, error) {
 	if mvtype == MT_STRING || mvtype == MT_INT {
 		empty := FromEmptyMap()
 		return empty, nil
-	} else {
-		return nil, errors.New(
-			"mlr: indices must be string, int, or array thereof; got " + GetTypeName(mvtype),
-		)
 	}
+	return nil, errors.New(
+		"indices must be string, int, or array thereof; got " + GetTypeName(mvtype),
+	)
 }
 
 func (mv *Mlrval) Arrayify() *Mlrval {
@@ -645,9 +621,8 @@ func (mv *Mlrval) Arrayify() *Mlrval {
 			}
 			return FromArray(arrayval)
 
-		} else {
-			return mv
 		}
+		return mv
 
 	} else if mv.IsArray() {
 		// TODO: comment (or rethink) that this modifies its inputs!!
@@ -659,9 +634,8 @@ func (mv *Mlrval) Arrayify() *Mlrval {
 		mv.intf = arrayval
 		return output
 
-	} else {
-		return mv
 	}
+	return mv
 }
 
 func LengthenMlrvalArray(array *[]*Mlrval, newLength64 int) {
@@ -732,7 +706,6 @@ func CollectionFold(
 		return ArrayFold(c.AcquireArrayValue(), initval, f)
 	} else if c.IsMap() {
 		return MapFold(c.AcquireMapValue(), initval, f)
-	} else {
-		panic("CollectionFold argument is neither array nor map")
 	}
+	panic("CollectionFold argument is neither array nor map")
 }
diff --git a/pkg/mlrval/mlrval_constants.go b/pkg/mlrval/mlrval_constants.go
index b168ad85e..53474a90d 100644
--- a/pkg/mlrval/mlrval_constants.go
+++ b/pkg/mlrval/mlrval_constants.go
@@ -1,12 +1,10 @@
-// ================================================================
 // Constants/singletons of various types
-// ================================================================
 
 package mlrval
 
 // These are made singletons as part of a copy-reduction effort.  They're not
 // marked const (I haven't figured out the right way to get that to compile;
-// just using `const` isn't enough) but the gentelpersons' agreement is that
+// just using `const` isn't enough) but the gentlepersons' agreement is that
 // the caller should never modify these.
 
 var TRUE = &Mlrval{
diff --git a/pkg/mlrval/mlrval_format.go b/pkg/mlrval/mlrval_format.go
index 940b8864e..f273a2b7f 100644
--- a/pkg/mlrval/mlrval_format.go
+++ b/pkg/mlrval/mlrval_format.go
@@ -27,9 +27,7 @@ import (
 //  bdiouxDOUX fegFEG s
 //
 //  post-stuff
-// ----------------------------------------------------------------
 
-// ----------------------------------------------------------------
 //* callsites:
 //  o fmtnum($mv, "%d")
 //    - numeric only
@@ -39,7 +37,6 @@ import (
 //    - numeric only
 //  k format-values verb
 //    - -i, -f, -s
-// ----------------------------------------------------------------
 
 // Nil means use default format.
 // Set from the CLI parser using mlr --ofmt.
@@ -146,7 +143,6 @@ func newFormatter(
 	return newFormatterToString(goFormatString), nil
 }
 
-
 type formatterToFloat struct {
 	goFormatString string
 }
@@ -157,35 +153,32 @@ func newFormatterToFloat(goFormatString string) IFormatter {
 	}
 }
 
-func (formatter *formatterToFloat) Format(mv *Mlrval) *Mlrval {
+func (fmtr *formatterToFloat) Format(mv *Mlrval) *Mlrval {
 	floatValue, isFloat := mv.GetFloatValue()
 	if isFloat {
-		formatted := fmt.Sprintf(formatter.goFormatString, floatValue)
+		formatted := fmt.Sprintf(fmtr.goFormatString, floatValue)
 		return TryFromFloatString(formatted)
 	}
 	intValue, isInt := mv.GetIntValue()
 	if isInt {
-		formatted := fmt.Sprintf(formatter.goFormatString, float64(intValue))
+		formatted := fmt.Sprintf(fmtr.goFormatString, float64(intValue))
 		return TryFromFloatString(formatted)
 	}
 	return mv
 }
 
-func (formatter *formatterToFloat) FormatFloat(floatValue float64) string {
-	return fmt.Sprintf(formatter.goFormatString, floatValue)
+func (fmtr *formatterToFloat) FormatFloat(floatValue float64) string {
+	return fmt.Sprintf(fmtr.goFormatString, floatValue)
 }
 
-
 func getLanguageTag() language.Tag {
 	v, ok := os.LookupEnv("LANG")
 	if ok {
 		return language.Make(v)
-	} else {
-		return language.Make("en")
 	}
+	return language.Make("en")
 }
 
-
 type formatterToSeparatedInt struct {
 	goFormatString string
 	printer        *message.Printer
@@ -198,25 +191,24 @@ func newFormatterToSeparatedInt(goFormatString string) IFormatter {
 	}
 }
 
-func (formatter *formatterToSeparatedInt) Format(mv *Mlrval) *Mlrval {
+func (fmtr *formatterToSeparatedInt) Format(mv *Mlrval) *Mlrval {
 	intValue, isInt := mv.GetIntValue()
 	if isInt {
-		formatted := formatter.printer.Sprintf(formatter.goFormatString, intValue)
+		formatted := fmtr.printer.Sprintf(fmtr.goFormatString, intValue)
 		return TryFromIntString(formatted)
 	}
 	floatValue, isFloat := mv.GetFloatValue()
 	if isFloat {
-		formatted := formatter.printer.Sprintf(formatter.goFormatString, int(floatValue))
+		formatted := fmtr.printer.Sprintf(fmtr.goFormatString, int(floatValue))
 		return TryFromIntString(formatted)
 	}
 	return mv
 }
 
-func (formatter *formatterToSeparatedInt) FormatFloat(floatValue float64) string {
-	return formatter.printer.Sprintf(formatter.goFormatString, int(floatValue))
+func (fmtr *formatterToSeparatedInt) FormatFloat(floatValue float64) string {
+	return fmtr.printer.Sprintf(fmtr.goFormatString, int(floatValue))
 }
 
-
 type formatterToSeparatedFloat struct {
 	goFormatString string
 	printer        *message.Printer
@@ -229,25 +221,24 @@ func newFormatterToSeparatedFloat(goFormatString string) IFormatter {
 	}
 }
 
-func (formatter *formatterToSeparatedFloat) Format(mv *Mlrval) *Mlrval {
+func (fmtr *formatterToSeparatedFloat) Format(mv *Mlrval) *Mlrval {
 	floatValue, isFloat := mv.GetFloatValue()
 	if isFloat {
-		formatted := formatter.printer.Sprintf(formatter.goFormatString, floatValue)
+		formatted := fmtr.printer.Sprintf(fmtr.goFormatString, floatValue)
 		return TryFromFloatString(formatted)
 	}
 	intValue, isInt := mv.GetIntValue()
 	if isInt {
-		formatted := formatter.printer.Sprintf(formatter.goFormatString, float64(intValue))
+		formatted := fmtr.printer.Sprintf(fmtr.goFormatString, float64(intValue))
 		return TryFromFloatString(formatted)
 	}
 	return mv
 }
 
-func (formatter *formatterToSeparatedFloat) FormatFloat(floatValue float64) string {
-	return formatter.printer.Sprintf(formatter.goFormatString, floatValue)
+func (fmtr *formatterToSeparatedFloat) FormatFloat(floatValue float64) string {
+	return fmtr.printer.Sprintf(fmtr.goFormatString, floatValue)
 }
 
-
 type formatterToInt struct {
 	goFormatString string
 }
@@ -258,25 +249,24 @@ func newFormatterToInt(goFormatString string) IFormatter {
 	}
 }
 
-func (formatter *formatterToInt) Format(mv *Mlrval) *Mlrval {
+func (fmtr *formatterToInt) Format(mv *Mlrval) *Mlrval {
 	intValue, isInt := mv.GetIntValue()
 	if isInt {
-		formatted := fmt.Sprintf(formatter.goFormatString, intValue)
+		formatted := fmt.Sprintf(fmtr.goFormatString, intValue)
 		return TryFromIntString(formatted)
 	}
 	floatValue, isFloat := mv.GetFloatValue()
 	if isFloat {
-		formatted := fmt.Sprintf(formatter.goFormatString, int(floatValue))
+		formatted := fmt.Sprintf(fmtr.goFormatString, int(floatValue))
 		return TryFromIntString(formatted)
 	}
 	return mv
 }
 
-func (formatter *formatterToInt) FormatFloat(floatValue float64) string {
-	return fmt.Sprintf(formatter.goFormatString, int(floatValue))
+func (fmtr *formatterToInt) FormatFloat(floatValue float64) string {
+	return fmt.Sprintf(fmtr.goFormatString, int(floatValue))
 }
 
-
 type formatterToString struct {
 	goFormatString string
 }
@@ -287,15 +277,15 @@ func newFormatterToString(goFormatString string) IFormatter {
 	}
 }
 
-func (formatter *formatterToString) Format(mv *Mlrval) *Mlrval {
+func (fmtr *formatterToString) Format(mv *Mlrval) *Mlrval {
 	return FromString(
 		fmt.Sprintf(
-			formatter.goFormatString,
+			fmtr.goFormatString,
 			mv.String(),
 		),
 	)
 }
 
-func (formatter *formatterToString) FormatFloat(floatValue float64) string {
+func (fmtr *formatterToString) FormatFloat(floatValue float64) string {
 	return strconv.FormatFloat(floatValue, 'g', -1, 64)
 }
diff --git a/pkg/mlrval/mlrval_get.go b/pkg/mlrval/mlrval_get.go
index 9c681229d..652dd331e 100644
--- a/pkg/mlrval/mlrval_get.go
+++ b/pkg/mlrval/mlrval_get.go
@@ -18,41 +18,36 @@ func (mv *Mlrval) GetTypeBit() int {
 func (mv *Mlrval) GetStringValue() (stringValue string, isString bool) {
 	if mv.Type() == MT_STRING || mv.Type() == MT_VOID {
 		return mv.printrep, true
-	} else {
-		return "", false
 	}
+	return "", false
 }
 
 func (mv *Mlrval) GetStringValueOrError(funcname string) (stringValue string, errValue *Mlrval) {
 	if mv.Type() == MT_STRING || mv.Type() == MT_VOID {
 		return mv.printrep, nil
-	} else {
-		return "", FromNotStringError(funcname, mv)
 	}
+	return "", FromNotStringError(funcname, mv)
 }
 
 func (mv *Mlrval) GetIntValue() (intValue int64, isInt bool) {
 	if mv.Type() == MT_INT {
 		return mv.intf.(int64), true
-	} else {
-		return -999, false
 	}
+	return -999, false
 }
 
 func (mv *Mlrval) GetIntValueOrError(funcname string) (intValue int64, errValue *Mlrval) {
 	if mv.Type() == MT_INT {
 		return mv.intf.(int64), nil
-	} else {
-		return -999, FromNotIntError(funcname, mv)
 	}
+	return -999, FromNotIntError(funcname, mv)
 }
 
 func (mv *Mlrval) GetFloatValue() (floatValue float64, isFloat bool) {
 	if mv.Type() == MT_FLOAT {
 		return mv.intf.(float64), true
-	} else {
-		return -777.0, false
 	}
+	return -777.0, false
 }
 
 func (mv *Mlrval) GetNumericToFloatValue() (floatValue float64, isFloat bool) {
@@ -60,9 +55,8 @@ func (mv *Mlrval) GetNumericToFloatValue() (floatValue float64, isFloat bool) {
 		return mv.intf.(float64), true
 	} else if mv.Type() == MT_INT {
 		return float64(mv.intf.(int64)), true
-	} else {
-		return -888.0, false
 	}
+	return -888.0, false
 }
 
 func (mv *Mlrval) GetNumericToFloatValueOrError(funcname string) (floatValue float64, errValue *Mlrval) {
@@ -70,9 +64,8 @@ func (mv *Mlrval) GetNumericToFloatValueOrError(funcname string) (floatValue flo
 		return mv.intf.(float64), nil
 	} else if mv.Type() == MT_INT {
 		return float64(mv.intf.(int64)), nil
-	} else {
-		return -888.0, FromNotNumericError(funcname, mv)
 	}
+	return -888.0, FromNotNumericError(funcname, mv)
 }
 
 func (mv *Mlrval) GetNumericNegativeorDie() bool {
@@ -84,49 +77,43 @@ func (mv *Mlrval) GetNumericNegativeorDie() bool {
 func (mv *Mlrval) GetBoolValue() (boolValue bool, isBool bool) {
 	if mv.Type() == MT_BOOL {
 		return mv.intf.(bool), true
-	} else {
-		return false, false
 	}
+	return false, false
 }
 
 func (mv *Mlrval) GetArray() []*Mlrval {
 	if mv.IsArray() {
 		return mv.intf.([]*Mlrval)
-	} else {
-		return nil
 	}
+	return nil
 }
 
 func (mv *Mlrval) GetArrayValueOrError(funcname string) (ok []*Mlrval, errValue *Mlrval) {
 	if mv.IsArray() {
 		return mv.intf.([]*Mlrval), nil
-	} else {
-		return nil, FromNotArrayError(funcname, mv)
 	}
+	return nil, FromNotArrayError(funcname, mv)
 }
 
 func (mv *Mlrval) GetMap() *Mlrmap {
 	if mv.IsMap() {
 		return mv.intf.(*Mlrmap)
-	} else {
-		return nil
 	}
+	return nil
 }
 
 func (mv *Mlrval) GetMapValueOrError(funcname string) (ok *Mlrmap, errValue *Mlrval) {
 	if mv.IsMap() {
 		return mv.intf.(*Mlrmap), nil
-	} else {
-		return nil, FromNotMapError(funcname, mv)
 	}
+	return nil, FromNotMapError(funcname, mv)
 }
 
 func (mv *Mlrval) GetFunction() interface{} {
 	if mv.Type() == MT_FUNC {
 		return mv.intf
-	} else {
-		return nil
 	}
+	return nil
 }
 
 func (mv *Mlrval) GetTypeName() string {
diff --git a/pkg/mlrval/mlrval_get_test.go b/pkg/mlrval/mlrval_get_test.go
index 90abc8598..637dfa7a9 100644
--- a/pkg/mlrval/mlrval_get_test.go
+++ b/pkg/mlrval/mlrval_get_test.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Tests mlrval typed-value extractors
-// ================================================================
 
 package mlrval
 
diff --git a/pkg/mlrval/mlrval_infer.go b/pkg/mlrval/mlrval_infer.go
index ca35b85b8..60437279b 100644
--- a/pkg/mlrval/mlrval_infer.go
+++ b/pkg/mlrval/mlrval_infer.go
@@ -70,8 +70,6 @@ func inferString(mv *Mlrval) *Mlrval {
 	return mv.SetFromString(mv.printrep)
 }
 
-// ----------------------------------------------------------------
-
 // Important: synchronize this with the type-ordering in the scan package.
 var normalInferrerTable []tInferrer = []tInferrer{
 	inferString,
@@ -101,9 +99,8 @@ func inferDecimalInt(mv *Mlrval) *Mlrval {
 	intval, err := strconv.ParseInt(mv.printrep, 10, 64)
 	if err == nil {
 		return mv.SetFromPrevalidatedIntString(mv.printrep, intval)
-	} else {
-		return mv.SetFromString(mv.printrep)
 	}
+	return mv.SetFromString(mv.printrep)
 }
 
 // inferLeadingZeroDecimalIntAsInt parses base-10 integers when leading zeros are allowed.
@@ -111,9 +108,8 @@ func inferLeadingZeroDecimalIntAsInt(mv *Mlrval) *Mlrval {
 	intval, err := strconv.ParseInt(mv.printrep, 10, 64)
 	if err == nil {
 		return mv.SetFromPrevalidatedIntString(mv.printrep, intval)
-	} else {
-		return mv.SetFromString(mv.printrep)
 	}
+	return mv.SetFromString(mv.printrep)
 }
 
 // inferOctalInt parses explicit 0o-prefixed octal integers.
@@ -127,9 +123,8 @@ func inferFromLeadingZeroOctalIntAsInt(mv *Mlrval) *Mlrval {
 	intval, err := strconv.ParseInt(mv.printrep, 8, 64)
 	if err == nil {
 		return mv.SetFromPrevalidatedIntString(mv.printrep, intval)
-	} else {
-		return mv.SetFromString(mv.printrep)
 	}
+	return mv.SetFromString(mv.printrep)
 }
 
 // inferHexInt parses 0x-prefixed hex integers with two's-complement handling.
@@ -167,19 +162,17 @@ func inferHexInt(mv *Mlrval) *Mlrval {
 		}
 		if err == nil {
 			return mv.SetFromPrevalidatedIntString(mv.printrep, intval)
-		} else {
-			return mv.SetFromString(mv.printrep)
 		}
+		return mv.SetFromString(mv.printrep)
+	}
+	intval, err := strconv.ParseInt(input, 16, 64)
+	if negate {
+		intval = -intval
+	}
+	if err == nil {
+		return mv.SetFromPrevalidatedIntString(mv.printrep, intval)
 	} else {
-		intval, err := strconv.ParseInt(input, 16, 64)
-		if negate {
-			intval = -intval
-		}
-		if err == nil {
-			return mv.SetFromPrevalidatedIntString(mv.printrep, intval)
-		} else {
-			return mv.SetFromString(mv.printrep)
-		}
+		return mv.SetFromString(mv.printrep)
 	}
 
 }
@@ -194,9 +187,8 @@ func inferMaybeFloat(mv *Mlrval) *Mlrval {
 	floatval, err := strconv.ParseFloat(mv.printrep, 64)
 	if err == nil {
 		return mv.SetFromPrevalidatedFloatString(mv.printrep, floatval)
-	} else {
-		return mv.SetFromString(mv.printrep)
 	}
+	return mv.SetFromString(mv.printrep)
 }
 
 // inferBaseInt is shared code for parsing 0o/0b integers.
@@ -220,7 +212,6 @@ func inferBaseInt(mv *Mlrval, base int) *Mlrval {
 			intval = -intval
 		}
 		return mv.SetFromPrevalidatedIntString(mv.printrep, intval)
-	} else {
-		return mv.SetFromString(mv.printrep)
 	}
+	return mv.SetFromString(mv.printrep)
 }
diff --git a/pkg/mlrval/mlrval_infer_test.go b/pkg/mlrval/mlrval_infer_test.go
index dcb4b01b9..8f6367a21 100644
--- a/pkg/mlrval/mlrval_infer_test.go
+++ b/pkg/mlrval/mlrval_infer_test.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Tests mlrval constructors.
-// ================================================================
 
 package mlrval
 
diff --git a/pkg/mlrval/mlrval_is.go b/pkg/mlrval/mlrval_is.go
index 0cdfdadde..0d60dce75 100644
--- a/pkg/mlrval/mlrval_is.go
+++ b/pkg/mlrval/mlrval_is.go
@@ -26,9 +26,8 @@ func (mv *Mlrval) IsError() bool {
 func (mv *Mlrval) GetError() (bool, error) {
 	if mv.Type() == MT_ERROR {
 		return true, mv.err
-	} else {
-		return false, nil
 	}
+	return false, nil
 }
 
 // TODO: comment no JIT-infer here -- absent is non-inferrable and we needn't take the expense of JIT.
diff --git a/pkg/mlrval/mlrval_is_test.go b/pkg/mlrval/mlrval_is_test.go
index d3f183403..8673ec528 100644
--- a/pkg/mlrval/mlrval_is_test.go
+++ b/pkg/mlrval/mlrval_is_test.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Tests mlrval constructors.
-// ================================================================
 
 package mlrval
 
diff --git a/pkg/mlrval/mlrval_json.go b/pkg/mlrval/mlrval_json.go
index 9a3c243d1..6a80f2315 100644
--- a/pkg/mlrval/mlrval_json.go
+++ b/pkg/mlrval/mlrval_json.go
@@ -1,10 +1,8 @@
-// ================================================================
 // Mlrval implements the Unmarshaler and Marshaler interfaces needed for
 // marshaling/unmarshaling to/from JSON, via the UnmarshalJSON and MarshalJSON
 // methods.
 //
 // Please see also https://golang.org/pkg/encoding/json/
-// ================================================================
 
 package mlrval
 
@@ -29,9 +27,8 @@ const (
 	JSON_MULTILINE   = 2
 )
 
-var prematureEofError error = errors.New("mlr: JSON parser: unexpected premature EOF")
+var prematureEofError error = errors.New("JSON parser: unexpected premature EOF")
 
-// ================================================================
 // The JSON decoder (https://golang.org/pkg/encoding/json/#Decoder) is quite
 // nice. What we can have is:
 //
@@ -63,7 +60,6 @@ var prematureEofError error = errors.New("mlr: JSON parser: unexpected premature
 // valid JSON items -- we can use decoder.Buffered() to continue stream
 // processing.
 //
-// ----------------------------------------------------------------
 // json.Token holds one of the following types:
 //
 // * Delim, for the four JSON delimiters [ ] { }
@@ -73,7 +69,6 @@ var prematureEofError error = errors.New("mlr: JSON parser: unexpected premature
 // * string, for JSON string literals
 // * nil, for JSON null
 //
-// ----------------------------------------------------------------
 // Note: we accept a sequence of valid JSON items, not just a JSON item.
 // E.g. either
 //
@@ -107,7 +102,7 @@ func (mv *Mlrval) UnmarshalJSON(inputBytes []byte) error {
 	decoder := json.NewDecoder(bytes.NewReader(inputBytes))
 	pmv, eof, err := MlrvalDecodeFromJSON(decoder)
 	if eof {
-		return fmt.Errorf("mlr: JSON parser: unexpected premature EOF")
+		return fmt.Errorf("JSON parser: unexpected premature EOF")
 	}
 	if err != nil {
 		return err
@@ -120,7 +115,7 @@ func TryUnmarshalJSON(inputBytes []byte) (pmv *Mlrval, err error) {
 	decoder := json.NewDecoder(bytes.NewReader(inputBytes))
 	pmv, eof, err := MlrvalDecodeFromJSON(decoder)
 	if eof {
-		err = fmt.Errorf("mlr: JSON parser: unexpected premature EOF")
+		err = fmt.Errorf("JSON parser: unexpected premature EOF")
 	}
 	return pmv, err
 }
@@ -166,7 +161,7 @@ func MlrvalDecodeFromJSON(decoder *json.Decoder) (
 		}
 
 		return nil, false, fmt.Errorf(
-			"mlr: JSON reader internal coding error: non-delimiter token unhandled",
+			"JSON reader internal coding error: non-delimiter token unhandled",
 		)
 
 	} else {
@@ -184,7 +179,7 @@ func MlrvalDecodeFromJSON(decoder *json.Decoder) (
 			collectionType = "JSON object`"
 		} else {
 			return nil, false, fmt.Errorf(
-				"mlr: JSON reader: Unhandled opening delimiter \"%s\"", string(delimiter),
+				"JSON reader: Unhandled opening delimiter \"%s\"", string(delimiter),
 			)
 		}
 
@@ -236,14 +231,14 @@ func MlrvalDecodeFromJSON(decoder *json.Decoder) (
 		}
 
 		imbalanceError := fmt.Errorf(
-			"mlr: JSON reader: did not find closing token \"%s\" for %s",
+			"JSON reader: did not find closing token \"%s\" for %s",
 			string(expectedClosingDelimiter),
 			collectionType,
 		)
 
 		endToken, err := decoder.Token()
 		if err == io.EOF {
-			return nil, false, fmt.Errorf("mlr: JSON parser: unexpected premature EOF")
+			return nil, false, fmt.Errorf("JSON parser: unexpected premature EOF")
 		}
 		if err != nil {
 			return nil, false, err
@@ -299,18 +294,17 @@ func (mv *Mlrval) marshalJSONAux(
 	case MT_MAP:
 		return mv.marshalJSONMap(jsonFormatting, elementNestingDepth, outputIsStdout)
 	case MT_DIM: // MT_DIM is one past the last valid type
-		return "", fmt.Errorf("mlr: internal coding error detected")
+		return "", fmt.Errorf("internal coding error detected")
 	}
-	return "", fmt.Errorf("mlr: Internal coding error detected")
+	return "", fmt.Errorf("Internal coding error detected")
 }
 
-// ================================================================
 // TYPE-SPECIFIC MARSHALERS
 
 func (mv *Mlrval) marshalJSONPending(outputIsStdout bool) (string, error) {
 	lib.InternalCodingErrorIf(mv.mvtype != MT_PENDING)
 	return "", fmt.Errorf(
-		"mlr: internal coding error: pending-values should not have been produced",
+		"internal coding error: pending-values should not have been produced",
 	)
 }
 
@@ -322,7 +316,7 @@ func (mv *Mlrval) marshalJSONError(outputIsStdout bool) (string, error) {
 func (mv *Mlrval) marshalJSONAbsent(outputIsStdout bool) (string, error) {
 	lib.InternalCodingErrorIf(mv.mvtype != MT_ABSENT)
 	return "", fmt.Errorf(
-		"mlr: internal coding error: absent-values should not have been assigned",
+		"internal coding error: absent-values should not have been assigned",
 	)
 }
 
@@ -438,9 +432,8 @@ func (mv *Mlrval) marshalJSONArray(
 
 	if allTerminal || (jsonFormatting == JSON_SINGLE_LINE) {
 		return mv.marshalJSONArraySingleLine(elementNestingDepth, outputIsStdout)
-	} else {
-		return mv.marshalJSONArrayMultipleLines(jsonFormatting, elementNestingDepth, outputIsStdout)
 	}
+	return mv.marshalJSONArrayMultipleLines(jsonFormatting, elementNestingDepth, outputIsStdout)
 }
 
 func (mv *Mlrval) marshalJSONArraySingleLine(
diff --git a/pkg/mlrval/mlrval_new.go b/pkg/mlrval/mlrval_new.go
index 767ae9e3e..f0bf4e35e 100644
--- a/pkg/mlrval/mlrval_new.go
+++ b/pkg/mlrval/mlrval_new.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Constructors
-// ================================================================
 
 package mlrval
 
@@ -125,14 +123,14 @@ func FromNotCollectionError(funcname string, v *Mlrval) *Mlrval {
 	return FromNotNamedTypeError(funcname, v, "array or map")
 }
 
-func FromNotNamedTypeError(funcname string, v *Mlrval, expected_type_name string) *Mlrval {
+func FromNotNamedTypeError(funcname string, v *Mlrval, expectedTypeName string) *Mlrval {
 	return FromError(
 		fmt.Errorf(
 			"%s: unacceptable value %s with type %s; needed type %s",
 			funcname,
 			v.StringMaybeQuoted(),
 			v.GetTypeName(),
-			expected_type_name,
+			expectedTypeName,
 		),
 	)
 }
@@ -150,10 +148,9 @@ func FromInferredType(input string) *Mlrval {
 		return TRUE
 	} else if input == "false" {
 		return FALSE
-	} else {
-		packageLevelInferrer(mv)
-		return mv
 	}
+	packageLevelInferrer(mv)
+	return mv
 }
 
 func FromString(input string) *Mlrval {
@@ -211,9 +208,8 @@ func TryFromIntString(input string) *Mlrval {
 	intval, ok := lib.TryIntFromString(input)
 	if ok {
 		return FromPrevalidatedIntString(input, intval)
-	} else {
-		return FromString(input)
 	}
+	return FromString(input)
 }
 
 // TODO: comment
@@ -256,9 +252,8 @@ func TryFromFloatString(input string) *Mlrval {
 	floatval, ok := lib.TryFloatFromString(input)
 	if ok {
 		return FromPrevalidatedFloatString(input, floatval)
-	} else {
-		return FromString(input)
 	}
+	return FromString(input)
 }
 
 // TODO: comment
@@ -280,9 +275,8 @@ func FromPrevalidatedFloatString(input string, floatval float64) *Mlrval {
 func FromBool(input bool) *Mlrval {
 	if input {
 		return TRUE
-	} else {
-		return FALSE
 	}
+	return FALSE
 }
 
 func FromBoolString(input string) *Mlrval {
@@ -290,10 +284,9 @@ func FromBoolString(input string) *Mlrval {
 		return TRUE
 	} else if input == "false" {
 		return FALSE
-	} else {
-		lib.InternalCodingErrorIf(true)
-		return nil // not reached
 	}
+	lib.InternalCodingErrorIf(true)
+	return nil // not reached
 }
 
 // The user-defined function is of type 'interface{}' here to avoid what would
@@ -328,7 +321,7 @@ func FromSingletonArray(element *Mlrval) *Mlrval {
 }
 
 func FromEmptyArray() *Mlrval {
-	return FromArray(make([]*Mlrval, 0))
+	return FromArray([]*Mlrval{})
 }
 
 func FromMap(mapval *Mlrmap) *Mlrval {
diff --git a/pkg/mlrval/mlrval_new_test.go b/pkg/mlrval/mlrval_new_test.go
index fe10bf4fd..8b7227af3 100644
--- a/pkg/mlrval/mlrval_new_test.go
+++ b/pkg/mlrval/mlrval_new_test.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Tests mlrval constructors.
-// ================================================================
 
 package mlrval
 
diff --git a/pkg/mlrval/mlrval_output.go b/pkg/mlrval/mlrval_output.go
index b6fd84e0f..bf14f9cfa 100644
--- a/pkg/mlrval/mlrval_output.go
+++ b/pkg/mlrval/mlrval_output.go
@@ -39,9 +39,8 @@ func (mv *Mlrval) String() string {
 func (mv *Mlrval) OriginalString() string {
 	if mv.printrepValid {
 		return mv.printrep
-	} else {
-		return mv.String()
 	}
+	return mv.String()
 }
 
 // StringMaybeQuoted Returns strings double-quoted; all else not.
@@ -49,9 +48,8 @@ func (mv *Mlrval) StringMaybeQuoted() string {
 	output := mv.String()
 	if mv.mvtype == MT_VOID || mv.mvtype == MT_STRING {
 		return `"` + output + `"`
-	} else {
-		return output
 	}
+	return output
 }
 
 // See mlrval.go for more about JIT-formatting of string backings
@@ -97,7 +95,7 @@ func (mv *Mlrval) setPrintRep() {
 			bytes, err := mv.MarshalJSON(JSON_MULTILINE, false)
 			// maybe just InternalCodingErrorIf(err != nil)
 			if err != nil {
-				fmt.Fprintln(os.Stderr, err)
+				fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 				os.Exit(1)
 			}
 			mv.printrep = string(bytes)
@@ -106,7 +104,7 @@ func (mv *Mlrval) setPrintRep() {
 			bytes, err := mv.MarshalJSON(JSON_MULTILINE, false)
 			// maybe just InternalCodingErrorIf(err != nil)
 			if err != nil {
-				fmt.Fprintln(os.Stderr, err)
+				fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 				os.Exit(1)
 			}
 			mv.printrep = string(bytes)
diff --git a/pkg/mlrval/mlrval_sort.go b/pkg/mlrval/mlrval_sort.go
index 75795b999..8420ef7c7 100644
--- a/pkg/mlrval/mlrval_sort.go
+++ b/pkg/mlrval/mlrval_sort.go
@@ -1,4 +1,3 @@
-// ================================================================
 // For sorting
 //
 // Sort rules (same for min, max, and comparator):
@@ -8,8 +7,6 @@
 // * string compares on strings
 // * numeric compares on numbers
 // * false < true
-// ================================================================
-// ================================================================
 
 package mlrval
 
@@ -28,9 +25,8 @@ func LexicalAscendingComparator(input1 *Mlrval, input2 *Mlrval) int {
 		return -1
 	} else if sa > sb {
 		return 1
-	} else {
-		return 0
 	}
+	return 0
 }
 
 // LexicalDescendingComparator is for reverse-lexical sort: it stringifies
@@ -54,9 +50,8 @@ func CaseFoldAscendingComparator(input1 *Mlrval, input2 *Mlrval) int {
 		return -1
 	} else if sa > sb {
 		return 1
-	} else {
-		return 0
 	}
+	return 0
 }
 
 // CaseFoldDescendingComparator is for case-folded lexical sort: it stringifies
@@ -92,9 +87,8 @@ func NaturalAscendingComparator(input1, input2 *Mlrval) int {
 
 	if natsort.Compare(input1.String(), input2.String()) {
 		return 1
-	} else {
-		return -1
 	}
+	return -1
 }
 
 func NaturalDescendingComparator(input1, input2 *Mlrval) int {
diff --git a/pkg/mlrval/mlrval_sort_test.go b/pkg/mlrval/mlrval_sort_test.go
index 9e1f45ac8..915c1452b 100644
--- a/pkg/mlrval/mlrval_sort_test.go
+++ b/pkg/mlrval/mlrval_sort_test.go
@@ -6,7 +6,6 @@ import (
 	"github.com/stretchr/testify/assert"
 )
 
-// ----------------------------------------------------------------
 // SORTING
 //
 // Lexical compare is just string-sort on stringify of mlrvals:
diff --git a/pkg/mlrval/mlrval_type.go b/pkg/mlrval/mlrval_type.go
index e823029e0..8fb3fd056 100644
--- a/pkg/mlrval/mlrval_type.go
+++ b/pkg/mlrval/mlrval_type.go
@@ -1,4 +1,3 @@
-// ================================================================
 // The `Mlrval` structure includes **string, int, float, boolean, void,
 // absent, and error** types (not unlike PHP's `zval`) as well as
 // type-conversion logic for various operators.
@@ -6,7 +5,6 @@
 // Whenever I say "int" and "float" with regard to mlrvals I always mean
 // "int64" and "float64". If I ever miss a spot and use Go int/float types then
 // that is a bug. It would be great to be able to somehow lint for this.
-// ================================================================
 
 // TODO:
 // * why here carefully fenced
@@ -195,7 +193,6 @@ func TypeNameToMask(typeName string) (mask int, present bool) {
 	retval := typeNameToMaskMap[typeName]
 	if retval != 0 {
 		return retval, true
-	} else {
-		return 0, false
 	}
+	return 0, false
 }
diff --git a/pkg/mlrval/mlrval_yaml.go b/pkg/mlrval/mlrval_yaml.go
index 9410600bb..10ff7e822 100644
--- a/pkg/mlrval/mlrval_yaml.go
+++ b/pkg/mlrval/mlrval_yaml.go
@@ -1,9 +1,7 @@
-// ================================================================
 // YAML decode/encode for Mlrval and Mlrmap.
 // Converts between YAML native types (from gopkg.in/yaml.v3) and Miller's
 // record model. YAML maps become Mlrmap; keys are stringified (YAML allows
 // non-string keys). Used by the YAML record reader and writer.
-// ================================================================
 
 package mlrval
 
diff --git a/pkg/mlrval/mlrval_yaml_test.go b/pkg/mlrval/mlrval_yaml_test.go
index 0c40d58e3..ea04a5c97 100644
--- a/pkg/mlrval/mlrval_yaml_test.go
+++ b/pkg/mlrval/mlrval_yaml_test.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Tests for YAML decode/encode (MlrvalDecodeFromYAML, MlrmapToYAMLNative).
-// ================================================================
 
 package mlrval
 
diff --git a/pkg/output/channel_writer.go b/pkg/output/channel_writer.go
index e5824fae0..df9385ff4 100644
--- a/pkg/output/channel_writer.go
+++ b/pkg/output/channel_writer.go
@@ -118,9 +118,8 @@ func channelWriterHandleBatch(
 			if err != nil {
 				fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 				return true, true
-			} else {
-				return true, false
 			}
+			return true, false
 		}
 	}
 	return false, false
diff --git a/pkg/output/file_output_handlers.go b/pkg/output/file_output_handlers.go
index 0ab378f9f..b19e8ebd8 100644
--- a/pkg/output/file_output_handlers.go
+++ b/pkg/output/file_output_handlers.go
@@ -1,4 +1,3 @@
-// ================================================================
 // These are handlers for print, dump, emit, etc in the put/filter verbs.
 //
 // * For "> filename" ">> filename", these handle the open/write/close file operations.
@@ -59,9 +58,8 @@ func NewFileOutputHandlerManager(
 ) *MultiOutputHandlerManager {
 	if doAppend {
 		return NewFileAppendHandlerManager(recordWriterOptions)
-	} else {
-		return NewFileWritetHandlerManager(recordWriterOptions)
 	}
+	return NewFileWritetHandlerManager(recordWriterOptions)
 }
 
 func NewFileWritetHandlerManager(
@@ -124,72 +122,72 @@ func NewStderrWriteHandlerManager(
 	}
 }
 
-func (manager *MultiOutputHandlerManager) WriteString(
+func (mgr *MultiOutputHandlerManager) WriteString(
 	outputString string,
 	filename string,
 ) error {
-	outputHandler, err := manager.getOutputHandlerFor(filename)
+	outputHandler, err := mgr.getOutputHandlerFor(filename)
 	if err != nil {
 		return err
 	}
 	return outputHandler.WriteString(outputString)
 }
 
-func (manager *MultiOutputHandlerManager) WriteRecordAndContext(
+func (mgr *MultiOutputHandlerManager) WriteRecordAndContext(
 	outrecAndContext *types.RecordAndContext,
 	filename string,
 ) error {
-	outputHandler, err := manager.getOutputHandlerFor(filename)
+	outputHandler, err := mgr.getOutputHandlerFor(filename)
 	if err != nil {
 		return err
 	}
 	return outputHandler.WriteRecordAndContext(outrecAndContext)
 }
 
-func (manager *MultiOutputHandlerManager) getOutputHandlerFor(
+func (mgr *MultiOutputHandlerManager) getOutputHandlerFor(
 	filename string,
 ) (OutputHandler, error) {
-	if manager.singleHandler != nil {
-		return manager.singleHandler, nil
+	if mgr.singleHandler != nil {
+		return mgr.singleHandler, nil
 	}
 
 	// TODO: LRU with close and re-open in case too many files are open
-	outputHandler := manager.outputHandlers[filename]
+	outputHandler := mgr.outputHandlers[filename]
 	if outputHandler == nil {
 		var err error
-		if manager.pipe {
+		if mgr.pipe {
 			outputHandler, err = NewPipeWriteOutputHandler(
 				filename,
-				manager.recordWriterOptions,
+				mgr.recordWriterOptions,
 			)
-		} else if manager.append {
+		} else if mgr.append {
 			outputHandler, err = NewFileAppendOutputHandler(
 				filename,
-				manager.recordWriterOptions,
+				mgr.recordWriterOptions,
 			)
 		} else {
 			outputHandler, err = NewFileWriteOutputHandler(
 				filename,
-				manager.recordWriterOptions,
+				mgr.recordWriterOptions,
 			)
 		}
 		if err != nil {
 			return nil, err
 		}
-		manager.outputHandlers[filename] = outputHandler
+		mgr.outputHandlers[filename] = outputHandler
 	}
 	return outputHandler, nil
 }
 
-func (manager *MultiOutputHandlerManager) Close() []error {
-	errs := make([]error, 0)
-	if manager.singleHandler != nil {
-		err := manager.singleHandler.Close()
+func (mgr *MultiOutputHandlerManager) Close() []error {
+	errs := []error{}
+	if mgr.singleHandler != nil {
+		err := mgr.singleHandler.Close()
 		if err != nil {
 			errs = append(errs, err)
 		}
 	}
-	for _, outputHandler := range manager.outputHandlers {
+	for _, outputHandler := range mgr.outputHandlers {
 		err := outputHandler.Close()
 		if err != nil {
 			errs = append(errs, err)
@@ -242,9 +240,8 @@ func NewFileOutputHandler(
 ) (*FileOutputHandler, error) {
 	if doAppend {
 		return NewFileAppendOutputHandler(filename, recordWriterOptions)
-	} else {
-		return NewFileWriteOutputHandler(filename, recordWriterOptions)
 	}
+	return NewFileWriteOutputHandler(filename, recordWriterOptions)
 }
 
 func NewFileWriteOutputHandler(
@@ -403,7 +400,6 @@ func (handler *FileOutputHandler) Close() (retval error) {
 	handler.bufferedOutputStream.Flush()
 	if handler.closeable {
 		return handler.handle.Close()
-	} else { // e.g. stdout
-		return nil
-	}
+	} // e.g. stdout
+	return nil
 }
diff --git a/pkg/output/record_writer_csv_colorizer.go b/pkg/output/record_writer_csv_colorizer.go
index a9efd0b30..c520522bf 100644
--- a/pkg/output/record_writer_csv_colorizer.go
+++ b/pkg/output/record_writer_csv_colorizer.go
@@ -1,4 +1,3 @@
-// ================================================================
 // This file is adapted from
 // https://cs.opensource.google/go/go/+/refs/tags/go1.17.6:src/encoding/csv/writer.go
 // and used in accordance with its open-source license.
@@ -9,7 +8,6 @@
 // the CSV delimiter is ';', and likewise for other special characters in the
 // ANSI escape sequences.
 //
-// ================================================================
 // Copyright (c) 2009 The Go Authors. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -37,7 +35,6 @@
 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// ================================================================
 
 package output
 
diff --git a/pkg/output/record_writer_json_jsonl.go b/pkg/output/record_writer_json_jsonl.go
index c77e88df8..0739a9067 100644
--- a/pkg/output/record_writer_json_jsonl.go
+++ b/pkg/output/record_writer_json_jsonl.go
@@ -78,7 +78,7 @@ func (writer *RecordWriterJSON) writeWithListWrap(
 		// can place it neatly with commas here (if the user requested them).
 		s, err := outrec.MarshalJSON(writer.jsonFormatting, outputIsStdout)
 		if err != nil {
-			fmt.Fprintln(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 
@@ -119,7 +119,7 @@ func (writer *RecordWriterJSON) writeWithoutListWrap(
 	// can place it neatly with commas here (if the user requested them).
 	s, err := outrec.MarshalJSON(writer.jsonFormatting, outputIsStdout)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/output/record_writer_pprint.go b/pkg/output/record_writer_pprint.go
index 31bf56581..bbb1e49a5 100644
--- a/pkg/output/record_writer_pprint.go
+++ b/pkg/output/record_writer_pprint.go
@@ -25,10 +25,10 @@ type RecordWriterPPRINT struct {
 func NewRecordWriterPPRINT(writerOptions *cli.TWriterOptions) (*RecordWriterPPRINT, error) {
 	return &RecordWriterPPRINT{
 		writerOptions: writerOptions,
-		records:       make([]*mlrval.Mlrmap, 0),
+		records:       []*mlrval.Mlrmap{},
 
 		lastJoinedHeader: nil,
-		batch:            make([]*mlrval.Mlrmap, 0),
+		batch:            []*mlrval.Mlrmap{},
 	}, nil
 }
 
@@ -86,7 +86,6 @@ func (writer *RecordWriterPPRINT) Write(
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Returns false if there was nothing but empty record(s), e.g. 'mlr gap -n 10'.
 func (writer *RecordWriterPPRINT) writeHeterogenousList(
 	records []*mlrval.Mlrmap,
@@ -116,24 +115,22 @@ func (writer *RecordWriterPPRINT) writeHeterogenousList(
 
 	if maxNR == 0 {
 		return false
-	} else {
-		// Column name may be longer/shorter than all data values in the column
-		for key, oldMaxWidth := range maxWidths {
-			width := utf8.RuneCountInString(key)
-			if width > oldMaxWidth {
-				maxWidths[key] = width
-			}
-		}
-		if barred {
-			writer.writeHeterogenousListBarred(records, maxWidths, bufferedOutputStream, outputIsStdout)
-		} else {
-			writer.writeHeterogenousListNonBarred(records, maxWidths, bufferedOutputStream, outputIsStdout)
-		}
-		return true
 	}
+	// Column name may be longer/shorter than all data values in the column
+	for key, oldMaxWidth := range maxWidths {
+		width := utf8.RuneCountInString(key)
+		if width > oldMaxWidth {
+			maxWidths[key] = width
+		}
+	}
+	if barred {
+		writer.writeHeterogenousListBarred(records, maxWidths, bufferedOutputStream, outputIsStdout)
+	} else {
+		writer.writeHeterogenousListNonBarred(records, maxWidths, bufferedOutputStream, outputIsStdout)
+	}
+	return true
 }
 
-// ----------------------------------------------------------------
 // Example:
 //
 // a   b   i  x                    y
@@ -219,7 +216,6 @@ func (writer *RecordWriterPPRINT) writeHeterogenousListNonBarred(
 	}
 }
 
-// ----------------------------------------------------------------
 // Example:
 //
 // +-----+-----+----+----------------------+---------------------+
diff --git a/pkg/output/record_writer_xtab.go b/pkg/output/record_writer_xtab.go
index 10e565f2b..0525b1529 100644
--- a/pkg/output/record_writer_xtab.go
+++ b/pkg/output/record_writer_xtab.go
@@ -11,7 +11,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ----------------------------------------------------------------
 // Note: If OPS is single-character then we can do alignment of the form
 //
 //   ab  123
diff --git a/pkg/output/record_writer_yaml.go b/pkg/output/record_writer_yaml.go
index 4cf8b4d53..990b7f0b7 100644
--- a/pkg/output/record_writer_yaml.go
+++ b/pkg/output/record_writer_yaml.go
@@ -46,11 +46,11 @@ func (writer *RecordWriterYAML) writeWithListWrap(
 ) {
 	if outrec != nil {
 		if writer.bufferedRecords == nil {
-			writer.bufferedRecords = make([]interface{}, 0)
+			writer.bufferedRecords = []interface{}{}
 		}
 		native, err := mlrval.MlrmapToYAMLNative(outrec)
 		if err != nil {
-			fmt.Fprintln(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 		writer.bufferedRecords = append(writer.bufferedRecords, native)
@@ -58,7 +58,7 @@ func (writer *RecordWriterYAML) writeWithListWrap(
 		// End of stream: emit single YAML document as array
 		out, err := yaml.Marshal(writer.bufferedRecords)
 		if err != nil {
-			fmt.Fprintln(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 		bufferedOutputStream.Write(out)
@@ -78,12 +78,12 @@ func (writer *RecordWriterYAML) writeWithoutListWrap(
 	}
 	native, err := mlrval.MlrmapToYAMLNative(outrec)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 	out, err := yaml.Marshal(native)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 	bufferedOutputStream.Write(out)
diff --git a/pkg/pbnjay-strptime/strptime.go b/pkg/pbnjay-strptime/strptime.go
index 2fce22cbe..a01bddd97 100644
--- a/pkg/pbnjay-strptime/strptime.go
+++ b/pkg/pbnjay-strptime/strptime.go
@@ -112,19 +112,19 @@ func Check(format string) error {
 }
 
 func strptime_tz(
-	strptime_input, strptime_format string, ignoreUnsupported bool, useTZ bool, location *time.Location,
+	strptimeInput, strptimeFormat string, ignoreUnsupported bool, useTZ bool, location *time.Location,
 ) (time.Time, error) {
 	if _debug {
 		fmt.Printf("================================================================ STRPTIME ENTER\n")
-		fmt.Printf("strptime_input    \"%s\"\n", strptime_input)
-		fmt.Printf("strptime_format   \"%s\"\n", strptime_format)
+		fmt.Printf("strptimeInput    \"%s\"\n", strptimeInput)
+		fmt.Printf("strptimeFormat   \"%s\"\n", strptimeFormat)
 		defer fmt.Printf("================================================================ STRPTIME EXIT\n")
 	}
 
 	// E.g. re-write "%F" to "%Y-%m-%d".
-	strptime_format = expandShorthands(strptime_format)
+	strptimeFormat = expandShorthands(strptimeFormat)
 	if _debug {
-		fmt.Printf("strptime_input    \"%s\"\n", strptime_input)
+		fmt.Printf("strptimeInput    \"%s\"\n", strptimeInput)
 	}
 
 	// The job of strptime is to map "format strings" like "%Y-%m-%d %H:%M:%S" to
@@ -146,11 +146,11 @@ func strptime_tz(
 
 	goLibInput := ""
 	goLibTemplate := ""
-	// inputIdx: index into strptime_input (the date string). Format is walked via partsIndex.
+	// inputIdx: index into strptimeInput (the date string). Format is walked via partsIndex.
 	inputIdx := 0
 	firstComponent := true // no leading space before first component (avoids Go parse quirks)
 
-	partsBetweenPercentSigns := strings.Split(strptime_format, "%")
+	partsBetweenPercentSigns := strings.Split(strptimeFormat, "%")
 	nparts := len(partsBetweenPercentSigns)
 	for partsIndex := 0; partsIndex < nparts; /* increment in loop */ {
 		partBetweenPercentSigns := partsBetweenPercentSigns[partsIndex]
@@ -163,10 +163,10 @@ func strptime_tz(
 			// Check for prefix text. It must be an exact match, e.g. with input "foo 2021" and
 			// format "foo %Y", "foo " == "foo ". Or, if the format starts with a "%", we're
 			// checking "" == "".
-			if strptime_input[inputIdx:inputIdx+len(partBetweenPercentSigns)] != partBetweenPercentSigns {
+			if strptimeInput[inputIdx:inputIdx+len(partBetweenPercentSigns)] != partBetweenPercentSigns {
 				if _debug {
 					fmt.Printf("\"%s\" != \"%s\"\n",
-						strptime_input[inputIdx:inputIdx+len(partBetweenPercentSigns)], partBetweenPercentSigns,
+						strptimeInput[inputIdx:inputIdx+len(partBetweenPercentSigns)], partBetweenPercentSigns,
 					)
 				}
 				return time.Time{}, ErrFormatMismatch
@@ -181,7 +181,7 @@ func strptime_tz(
 			if _debug {
 				fmt.Printf("formatCode        '%c'\n", '%')
 			}
-			if strptime_input[inputIdx:inputIdx+1] != "%" {
+			if strptimeInput[inputIdx:inputIdx+1] != "%" {
 				if _debug {
 					fmt.Println("did not match %%")
 				}
@@ -238,25 +238,25 @@ func strptime_tz(
 			}
 			if dotOptional {
 				dotSearch := partBetweenPercentSigns[1:]
-				sil = strings.Index(strptime_input[inputIdx:], dotSearch)
+				sil = strings.Index(strptimeInput[inputIdx:], dotSearch)
 				if sil == -1 {
 					// Try without the dot: find the first char of the literal after %f
 					if partsIndex+1 < nparts {
 						nextPart := partsBetweenPercentSigns[partsIndex+1]
 						if len(nextPart) > 1 {
 							fallbackSearch := string(nextPart[1])
-							sil = strings.Index(strptime_input[inputIdx:], fallbackSearch)
+							sil = strings.Index(strptimeInput[inputIdx:], fallbackSearch)
 							if sil != -1 {
 								interveningLen = 0
 							}
 						} else {
-							sil = len(strptime_input) - inputIdx
+							sil = len(strptimeInput) - inputIdx
 							interveningLen = 0
 						}
 					}
 				}
 			} else {
-				sil = strings.Index(strptime_input[inputIdx:], partBetweenPercentSigns[1:])
+				sil = strings.Index(strptimeInput[inputIdx:], partBetweenPercentSigns[1:])
 			}
 		}
 		if sil == -1 {
@@ -266,7 +266,7 @@ func strptime_tz(
 			return time.Time{}, ErrFormatMismatch
 		}
 		if _debug {
-			fmt.Printf("inputComponent    \"%s\"\n", strptime_input[inputIdx:inputIdx+sil])
+			fmt.Printf("inputComponent    \"%s\"\n", strptimeInput[inputIdx:inputIdx+sil])
 		}
 
 		fracHasDigits := true // for non-%f format codes, unused
@@ -278,10 +278,10 @@ func strptime_tz(
 					// Supports mixed modes: no fraction ("20 UTC"), dot only ("20. UTC"), or digits ("20.123 UTC").
 					// Do not consume the rest of the string so that %f%z works:
 					// e.g. ".160001+0100" -> %f takes ".160001", %z takes "+0100".
-					sil, fracHasDigits = parseFracLen(strptime_input[inputIdx:])
+					sil, fracHasDigits = parseFracLen(strptimeInput[inputIdx:])
 				} else {
 					want := len(templateComponent)
-					remaining := len(strptime_input) - inputIdx
+					remaining := len(strptimeInput) - inputIdx
 					if remaining == 0 {
 						if _debug {
 							fmt.Printf("format/template mismatch 2\n")
@@ -306,7 +306,7 @@ func strptime_tz(
 			if formatCode == 'f' {
 				if sil > 0 {
 					// Check fracHasDigits for intervening-text case (when parseFracLen wasn't called)
-					fracVal := strptime_input[inputIdx : inputIdx+sil]
+					fracVal := strptimeInput[inputIdx : inputIdx+sil]
 					fracHasDigits = false
 					for _, c := range fracVal {
 						if c >= '0' && c <= '9' {
@@ -316,7 +316,7 @@ func strptime_tz(
 					}
 				}
 				if sil > 0 {
-					fracVal := strptime_input[inputIdx : inputIdx+sil]
+					fracVal := strptimeInput[inputIdx : inputIdx+sil]
 					goLibTemplate += "." + templateComponent
 					if fracHasDigits {
 						if fracVal[0] == '.' {
@@ -331,9 +331,9 @@ func strptime_tz(
 				// sil==0: no fraction, add nothing
 			} else if formatCode == 'p' {
 				goLibTemplate += templateComponent + sep
-				goLibInput += strings.ToUpper(strptime_input[inputIdx:inputIdx+sil]) + sep
+				goLibInput += strings.ToUpper(strptimeInput[inputIdx:inputIdx+sil]) + sep
 			} else {
-				comp := strptime_input[inputIdx : inputIdx+sil]
+				comp := strptimeInput[inputIdx : inputIdx+sil]
 				// Zero-pad numeric fields so single-digit input works (e.g. "1/07/2022" for %d/%m/%Y).
 				comp = zeroPadLeft(comp, len(templateComponent))
 				goLibTemplate += templateComponent + sep
@@ -343,16 +343,16 @@ func strptime_tz(
 
 		if !supported && sil == 0 {
 			// Ignore to the end of the string
-			inputIdx = len(strptime_input)
+			inputIdx = len(strptimeInput)
 		} else {
 			inputIdx += interveningLen + sil
 		}
 		partsIndex++
 	}
 
-	if inputIdx < len(strptime_input) {
+	if inputIdx < len(strptimeInput) {
 		if _debug {
-			fmt.Printf("Extra text on end of strptime_input\n")
+			fmt.Printf("Extra text on end of strptimeInput\n")
 		}
 		return time.Time{}, ErrFormatMismatch
 	}
@@ -366,17 +366,16 @@ func strptime_tz(
 	if useTZ {
 		if location != nil {
 			return time.ParseInLocation(goLibTemplate, goLibInput, location)
+		}
+		tz := os.Getenv("TZ")
+		if tz == "" {
+			return time.Parse(goLibTemplate, goLibInput)
 		} else {
-			tz := os.Getenv("TZ")
-			if tz == "" {
-				return time.Parse(goLibTemplate, goLibInput)
-			} else {
-				location, err := time.LoadLocation(tz)
-				if err != nil {
-					return time.Time{}, err
-				}
-				return time.ParseInLocation(goLibTemplate, goLibInput, location)
+			location, err := time.LoadLocation(tz)
+			if err != nil {
+				return time.Time{}, err
 			}
+			return time.ParseInLocation(goLibTemplate, goLibInput, location)
 		}
 	} else {
 		// Parse in UTC so strptime (without _local) is deterministic and matches docs.
diff --git a/pkg/platform/diff_notwindows.go b/pkg/platform/diff_notwindows.go
index 6e08400a2..f702b6db8 100644
--- a/pkg/platform/diff_notwindows.go
+++ b/pkg/platform/diff_notwindows.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Handling diff or fc for regression-test.
-// ================================================================
 
 //go:build !windows
 // +build !windows
diff --git a/pkg/platform/diff_windows.go b/pkg/platform/diff_windows.go
index b9b49aa6e..9a30101ce 100644
--- a/pkg/platform/diff_windows.go
+++ b/pkg/platform/diff_windows.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Handling diff or fc for regression-test.
-// ================================================================
 
 //go:build windows
 // +build windows
diff --git a/pkg/platform/getargs_notwindows.go b/pkg/platform/getargs_notwindows.go
index 8b70a0c82..f50dd702f 100644
--- a/pkg/platform/getargs_notwindows.go
+++ b/pkg/platform/getargs_notwindows.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Handling single quotes and double quotes is different on Windows unless
 // particular care is taken, which is what this file does.
-// ================================================================
 
 //go:build !windows
 // +build !windows
diff --git a/pkg/platform/getargs_windows.go b/pkg/platform/getargs_windows.go
index 75efe3331..b818298c5 100644
--- a/pkg/platform/getargs_windows.go
+++ b/pkg/platform/getargs_windows.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Handling single quotes and double quotes is different on Windows unless
 // particular care is taken, which is what this file does.
-// ================================================================
 
 //go:build windows
 // +build windows
@@ -65,7 +63,7 @@ func GetArgs() []string {
 		)
 	}
 
-	retargs := make([]string, 0)
+	retargs := []string{}
 
 	// TODO err/stetret if lens uneq
 
@@ -78,7 +76,7 @@ func GetArgs() []string {
 	}
 	//printArgs(retargs, "NEW")
 
-	globbed := make([]string, 0)
+	globbed := []string{}
 	for i := range retargs {
 		// Expand things like *.csv
 		matches, err := filepath.Glob(retargs[i])
diff --git a/pkg/platform/shellrun_notwindows.go b/pkg/platform/shellrun_notwindows.go
index fcc707b71..f701ff482 100644
--- a/pkg/platform/shellrun_notwindows.go
+++ b/pkg/platform/shellrun_notwindows.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Wraps 'sh -c foo bar' or 'cmd /c foo bar', nominally for regression-testing.
-// ================================================================
 
 //go:build !windows
 // +build !windows
diff --git a/pkg/platform/shellrun_windows.go b/pkg/platform/shellrun_windows.go
index 7ec3db7a7..a40f8a3ec 100644
--- a/pkg/platform/shellrun_windows.go
+++ b/pkg/platform/shellrun_windows.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Wraps 'sh -c foo bar' or 'cmd /c foo bar', nominally for regression-testing.
-// ================================================================
 
 //go:build windows
 // +build windows
@@ -41,11 +39,10 @@ func GetShellRunArray(command string) []string {
 	if os.Getenv("MSYSTEM") != "" {
 		// Running inside MSYS2; sufficiently Unix-like already.
 		return []string{"/bin/sh", "-c", command}
-	} else {
-		cmd := os.Getenv("COMSPEC")
-		if cmd == "" {
-			cmd = "C:\\Windows\\System32\\cmd.exe"
-		}
-		return []string{cmd, "/c", command}
 	}
+	cmd := os.Getenv("COMSPEC")
+	if cmd == "" {
+		cmd = "C:\\Windows\\System32\\cmd.exe"
+	}
+	return []string{cmd, "/c", command}
 }
diff --git a/pkg/runtime/stack.go b/pkg/runtime/stack.go
index ba6ba24b1..17f20f7be 100644
--- a/pkg/runtime/stack.go
+++ b/pkg/runtime/stack.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Stack frames for begin/end/if/for/function blocks
 //
 // A Miller DSL stack has two levels of nesting:
@@ -21,7 +20,6 @@
 //     func f() {         <-- stack frame in a new frameset
 //       a = 2            <-- this should create new inner 'a', not update the outer 'a'
 //     }
-// ================================================================
 
 package runtime
 
@@ -33,7 +31,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ================================================================
 // STACK VARIABLE
 
 // StackVariable is an opaque handle which a callsite can hold onto, which
@@ -62,7 +59,6 @@ func (sv *StackVariable) GetName() string {
 	return sv.name
 }
 
-// ================================================================
 // STACK METHODS
 
 type Stack struct {
@@ -97,7 +93,6 @@ func (stack *Stack) PopStackFrameSet() {
 	stack.head = stack.stackFrameSets[0]
 }
 
-// ----------------------------------------------------------------
 // All of these are simply delegations to the head frameset
 
 // For when an if/for/etc block is being entered
@@ -178,7 +173,6 @@ func (stack *Stack) UnsetIndexed(
 	stack.head.unsetIndexed(stackVariable, indices)
 }
 
-// ================================================================
 // STACKFRAMESET METHODS
 
 const stackFrameSetInitCap = 6
@@ -306,7 +300,6 @@ func (frameset *StackFrameSet) unsetIndexed(
 	}
 }
 
-// ================================================================
 // STACKFRAME METHODS
 
 const stackFrameInitCap = 10
@@ -338,9 +331,8 @@ func (frame *StackFrame) get(
 	offset, ok := frame.namesToOffsets[stackVariable.name]
 	if ok {
 		return frame.vars[offset].GetValue()
-	} else {
-		return nil
 	}
+	return nil
 }
 
 func (frame *StackFrame) has(
@@ -365,9 +357,8 @@ func (frame *StackFrame) set(
 		offsetInFrame := len(frame.vars) - 1
 		frame.namesToOffsets[stackVariable.name] = offsetInFrame
 		return nil
-	} else {
-		return frame.vars[offset].Assign(mlrval)
 	}
+	return frame.vars[offset].Assign(mlrval)
 }
 
 // TODO: audit for honor of error-return at callsites
@@ -386,12 +377,11 @@ func (frame *StackFrame) defineTyped(
 		offsetInFrame := len(frame.vars) - 1
 		frame.namesToOffsets[stackVariable.name] = offsetInFrame
 		return nil
-	} else {
-		return fmt.Errorf(
-			"%s: variable %s has already been defined in the same scope",
-			"mlr", stackVariable.name,
-		)
 	}
+	return fmt.Errorf(
+		"%s: variable %s has already been defined in the same scope",
+		"mlr", stackVariable.name,
+	)
 }
 
 // TODO: audit for honor of error-return at callsites
@@ -408,12 +398,11 @@ func (frame *StackFrame) setIndexed(
 			newval := mlrval.FromMap(mlrval.NewMlrmap())
 			newval.PutIndexed(indices, mv)
 			return frame.set(stackVariable, newval)
-		} else {
-			return fmt.Errorf(
-				"%s: map indices must be int or string; got %s",
-				"mlr", leadingIndex.GetTypeName(),
-			)
 		}
+		return fmt.Errorf(
+			"%s: map indices must be int or string; got %s",
+			"mlr", leadingIndex.GetTypeName(),
+		)
 	} else {
 		// For example maybe the variable exists and is an array but the
 		// leading index is a string.
diff --git a/pkg/runtime/state.go b/pkg/runtime/state.go
index 62383ad5c..54d3b06e4 100644
--- a/pkg/runtime/state.go
+++ b/pkg/runtime/state.go
@@ -1,8 +1,6 @@
-// ================================================================
 // Tracks everything needed for statement evaluation/assignment in the Miller
 // DSL runtimne: current record/context (the latter being NF, NR, etc);
 // out-of-stream variables; local-variable stack; etc.
-// ================================================================
 
 package runtime
 
diff --git a/pkg/scan/digits.go b/pkg/scan/digits.go
index 92f69894d..bfcd61505 100644
--- a/pkg/scan/digits.go
+++ b/pkg/scan/digits.go
@@ -60,31 +60,27 @@ var isFloatDigitTable = []bool{
 func isDecimalDigit(c byte) bool {
 	if c < 128 { // byte is unsigned in Go
 		return isDecimalDigitTable[c]
-	} else {
-		return false
 	}
+	return false
 }
 
 func isOctalDigit(c byte) bool {
 	if c < 128 { // byte is unsigned in Go
 		return isOctalDigitTable[c]
-	} else {
-		return false
 	}
+	return false
 }
 
 func isHexDigit(c byte) bool {
 	if c < 128 { // byte is unsigned in Go
 		return isHexDigitTable[c]
-	} else {
-		return false
 	}
+	return false
 }
 
 func isFloatDigit(c byte) bool {
 	if c < 128 { // byte is unsigned in Go
 		return isFloatDigitTable[c]
-	} else {
-		return false
 	}
+	return false
 }
diff --git a/pkg/scan/find.go b/pkg/scan/find.go
index 1de423f30..f3b0cadc9 100644
--- a/pkg/scan/find.go
+++ b/pkg/scan/find.go
@@ -46,9 +46,8 @@ func FindScanType(sinput string) ScanType {
 	if i0 == '.' {
 		if len(input) == 1 {
 			return scanTypeString
-		} else {
-			return findScanTypePositiveDecimalOrFloatOrString(input)
 		}
+		return findScanTypePositiveDecimalOrFloatOrString(input)
 	}
 
 	return scanTypeString
@@ -78,23 +77,20 @@ func findScanTypePositiveNumberOrString(input []byte) ScanType {
 			if i1 == 'x' || i1 == 'X' {
 				if len(input) == 2 {
 					return scanTypeString
-				} else {
-					return findScanTypePositiveHexOrString(input[2:])
 				}
+				return findScanTypePositiveHexOrString(input[2:])
 			}
 			if i1 == 'o' || i1 == 'O' {
 				if len(input) == 2 {
 					return scanTypeString
-				} else {
-					return findScanTypePositiveOctalOrString(input[2:])
 				}
+				return findScanTypePositiveOctalOrString(input[2:])
 			}
 			if i1 == 'b' || i1 == 'B' {
 				if len(input) == 2 {
 					return scanTypeString
-				} else {
-					return findScanTypePositiveBinaryOrString(input[2:])
 				}
+				return findScanTypePositiveBinaryOrString(input[2:])
 			}
 
 			allOctal := true
@@ -149,9 +145,8 @@ func findScanTypePositiveDecimalOrFloatOrString(input []byte) ScanType {
 	}
 	if maybeInt {
 		return scanTypeDecimalInt
-	} else {
-		return scanTypeMaybeFloat
 	}
+	return scanTypeMaybeFloat
 }
 
 // Leading 0o has already been stripped
diff --git a/pkg/stream/stream.go b/pkg/stream/stream.go
index c207a70c9..db4197e7e 100644
--- a/pkg/stream/stream.go
+++ b/pkg/stream/stream.go
@@ -37,7 +37,7 @@ func Stream(
 	// which sends along only one file name per call to Stream():
 	fileNames []string,
 	options *cli.TOptions,
-	recordTransformers []transformers.IRecordTransformer,
+	recordTransformers []transformers.RecordTransformer,
 	outputStream io.WriteCloser,
 	outputIsStdout bool,
 ) error {
diff --git a/pkg/terminals/help/entry.go b/pkg/terminals/help/entry.go
index 7d7b04961..489d13acd 100644
--- a/pkg/terminals/help/entry.go
+++ b/pkg/terminals/help/entry.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Online help
-// ================================================================
 
 package help
 
@@ -186,7 +184,6 @@ func init() {
 	}
 }
 
-// ================================================================
 // For things like 'mlr help foo', invoked through the terminals framework which
 // goes through our HelpMain().  Here, the args are the terminal part of the full
 // Miller command line: if the latter was "mlr --some-flag help foo bar" then
@@ -207,10 +204,9 @@ func HelpMain(args []string) int {
 		if len(args) > 0 {
 			helpByApproximateSearch(args)
 			return 0
-		} else {
-			fmt.Printf("mlr help find: need one or more things to search for.\n")
-			return 1
 		}
+		fmt.Printf("mlr help find: need one or more things to search for.\n")
+		return 1
 	}
 
 	// "mlr help something" where we recognize the something
@@ -261,7 +257,6 @@ Please see 'mlr help topics' for more information.
 	fmt.Fprintf(o, "Please also see %s\n", lib.DOC_URL)
 }
 
-// ----------------------------------------------------------------
 // For things like 'mlr -F', invoked through the CLI parser which does not
 // go through our HelpMain().
 func ParseTerminalUsage(arg string) bool {
@@ -612,7 +607,6 @@ func helpTypeArithmeticInfoAux(extended bool) {
 	}
 }
 
-// ----------------------------------------------------------------
 // listFlagSections et al. are for webdoc/manpage autogen in the miller/docs
 // and miller/man subdirectories. Unlike showFlagsHelp where all looping over
 // the flags table, its sections, and flags within each section is done within
@@ -853,7 +847,6 @@ func helpForKeyword(args []string) {
 	}
 }
 
-// ----------------------------------------------------------------
 // flagTableNilCheckflagTableNilCheck is invoked by an internal-only
 // command-handler. It's intended to be invoked from a regression-test context.
 // It makes sure (at build time) that the flags-table isn't missing help strings
diff --git a/pkg/terminals/regtest/entry.go b/pkg/terminals/regtest/entry.go
index 2abb91ee3..eda7696b5 100644
--- a/pkg/terminals/regtest/entry.go
+++ b/pkg/terminals/regtest/entry.go
@@ -1,6 +1,4 @@
-// ================================================================
 // TODO
-// ================================================================
 
 package regtest
 
diff --git a/pkg/terminals/regtest/regtester.go b/pkg/terminals/regtest/regtester.go
index 255452350..e477ca6b4 100644
--- a/pkg/terminals/regtest/regtester.go
+++ b/pkg/terminals/regtest/regtester.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Logic for executing regression tests via 'mlr regtest'.
 //
 // Why: Basically we're re-implementing a shell, or at least some basic
@@ -51,7 +50,6 @@
 //
 // $cat test/cases/dsl-redirects//0109/mlr
 //  @a[NR]=$a; @b[NR]=$b; emit > stderr, (@a, @b), "NR"
-// ================================================================
 
 package regtest
 
@@ -130,24 +128,23 @@ func NewRegTester(
 		directoryFailCount: 0,
 		casePassCount:      0,
 		caseFailCount:      0,
-		failDirNames:       make([]string, 0),
-		failCaseNames:      make([]string, 0),
+		failDirNames:       []string{},
+		failCaseNames:      []string{},
 		firstNFailsToShow:  firstNFailsToShow,
 	}
 }
 
-func (regtester *RegTester) resetCounts() {
-	regtester.directoryPassCount = 0
-	regtester.directoryFailCount = 0
-	regtester.casePassCount = 0
-	regtester.caseFailCount = 0
+func (rt *RegTester) resetCounts() {
+	rt.directoryPassCount = 0
+	rt.directoryFailCount = 0
+	rt.casePassCount = 0
+	rt.caseFailCount = 0
 }
 
-// ----------------------------------------------------------------
-// Top-level entrypoint for the regtester. See the usage function in entry.go
+// Top-level entrypoint for the rt. See the usage function in entry.go
 // for semantics.
 
-func (regtester *RegTester) Execute(
+func (rt *RegTester) Execute(
 	casePaths []string,
 ) bool {
 	// Don't let the current user's settings affect expected results
@@ -163,75 +160,73 @@ func (regtester *RegTester) Execute(
 	// computed. For regression-test we OFMT from an environment variable.
 	os.Setenv("MLR_OFMT", "%.8f")
 
-	regtester.resetCounts()
+	rt.resetCounts()
 
 	lib.InternalCodingErrorIf(len(casePaths) == 0)
 	sort.Strings(casePaths)
 
-	if !regtester.plainMode {
+	if !rt.plainMode {
 		fmt.Println("REGRESSION TEST:")
 		for _, path := range casePaths {
 			fmt.Printf("  %s\n", path)
 		}
-		fmt.Printf("Using executable: %s\n", regtester.exeName)
+		fmt.Printf("Using executable: %s\n", rt.exeName)
 		fmt.Println()
 	}
 
 	for _, path := range casePaths {
-		regtester.executeSinglePath(path)
+		rt.executeSinglePath(path)
 	}
 
-	if len(regtester.failCaseNames) > 0 && regtester.firstNFailsToShow > 0 {
+	if len(rt.failCaseNames) > 0 && rt.firstNFailsToShow > 0 {
 		fmt.Println()
 		fmt.Println("RERUNS OF FIRST FAILED CASE FILES:")
 		verbosityLevel := 3
 		i := 0
-		for _, e := range regtester.failCaseNames {
-			regtester.executeSingleCmdFile(e, verbosityLevel)
+		for _, e := range rt.failCaseNames {
+			rt.executeSingleCmdFile(e, verbosityLevel)
 			i++
-			if i >= regtester.firstNFailsToShow {
+			if i >= rt.firstNFailsToShow {
 				break
 			}
 		}
 	}
 
-	if !regtester.plainMode && len(regtester.failDirNames) > 0 {
+	if !rt.plainMode && len(rt.failDirNames) > 0 {
 		fmt.Println()
 		fmt.Println("FAILED CASE DIRECTORIES:")
-		for _, e := range regtester.failDirNames {
+		for _, e := range rt.failDirNames {
 			fmt.Printf("  %s/\n", e)
 		}
 	}
 
-	if !regtester.plainMode {
+	if !rt.plainMode {
 		fmt.Println()
-		fmt.Printf("NUMBER OF CASES            PASSED %d\n", regtester.casePassCount)
-		fmt.Printf("NUMBER OF CASES            FAILED %d\n", regtester.caseFailCount)
-		fmt.Printf("NUMBER OF CASE-DIRECTORIES PASSED %d\n", regtester.directoryPassCount)
-		fmt.Printf("NUMBER OF CASE-DIRECTORIES FAILED %d\n", regtester.directoryFailCount)
+		fmt.Printf("NUMBER OF CASES            PASSED %d\n", rt.casePassCount)
+		fmt.Printf("NUMBER OF CASES            FAILED %d\n", rt.caseFailCount)
+		fmt.Printf("NUMBER OF CASE-DIRECTORIES PASSED %d\n", rt.directoryPassCount)
+		fmt.Printf("NUMBER OF CASE-DIRECTORIES FAILED %d\n", rt.directoryFailCount)
 		fmt.Println()
 	}
 
 	// Directory count may be zero if we were invoked with all paths on the
 	// command line being .cmd files.
-	if regtester.casePassCount > 0 && regtester.caseFailCount == 0 {
-		if !regtester.plainMode {
+	if rt.casePassCount > 0 && rt.caseFailCount == 0 {
+		if !rt.plainMode {
 			fmt.Printf("%s overall\n", colorizer.MaybeColorizePass("PASS", true))
 		}
 		return true
-	} else {
-		if !regtester.plainMode {
-			fmt.Printf("%s overall\n", colorizer.MaybeColorizeFail("FAIL", true))
-		}
-		return false
 	}
+	if !rt.plainMode {
+		fmt.Printf("%s overall\n", colorizer.MaybeColorizeFail("FAIL", true))
+	}
+	return false
 }
 
-// ----------------------------------------------------------------
 // Recursively invoked routine to process either a single .cmd file, or a
 // directory of such, or a directory of directories.
 
-func (regtester *RegTester) executeSinglePath(
+func (rt *RegTester) executeSinglePath(
 	path string,
 ) bool {
 	handle, err := os.Stat(path)
@@ -241,25 +236,25 @@ func (regtester *RegTester) executeSinglePath(
 	}
 	mode := handle.Mode()
 	if mode.IsDir() {
-		passed, hasCaseSubdirectories := regtester.executeSingleDirectory(path)
+		passed, hasCaseSubdirectories := rt.executeSingleDirectory(path)
 		if hasCaseSubdirectories {
 			if passed {
-				regtester.directoryPassCount++
+				rt.directoryPassCount++
 			} else {
-				regtester.directoryFailCount++
-				regtester.failDirNames = append(regtester.failDirNames, path)
+				rt.directoryFailCount++
+				rt.failDirNames = append(rt.failDirNames, path)
 			}
 		}
 		return passed
 	} else if mode.IsRegular() {
 		basename := filepath.Base(path)
 		if basename == CmdName {
-			passed := regtester.executeSingleCmdFile(path, regtester.verbosityLevel)
+			passed := rt.executeSingleCmdFile(path, rt.verbosityLevel)
 			if passed {
-				regtester.casePassCount++
+				rt.casePassCount++
 			} else {
-				regtester.caseFailCount++
-				regtester.failCaseNames = append(regtester.failCaseNames, path)
+				rt.caseFailCount++
+				rt.failCaseNames = append(rt.failCaseNames, path)
 			}
 			return passed
 		}
@@ -270,15 +265,15 @@ func (regtester *RegTester) executeSinglePath(
 	return false // fall-through
 }
 
-func (regtester *RegTester) executeSingleDirectory(
+func (rt *RegTester) executeSingleDirectory(
 	dirName string,
 ) (bool, bool) {
 	passed := true
 	// TODO: comment
-	fileNames, hasCaseSubdirectories := regtester.hasCaseSubdirectories(dirName)
+	fileNames, hasCaseSubdirectories := rt.hasCaseSubdirectories(dirName)
 
-	if !regtester.plainMode {
-		if hasCaseSubdirectories && regtester.verbosityLevel >= 2 {
+	if !rt.plainMode {
+		if hasCaseSubdirectories && rt.verbosityLevel >= 2 {
 			fmt.Printf("%s BEGIN %s/\n", MajorSeparator, dirName)
 		}
 	}
@@ -286,7 +281,7 @@ func (regtester *RegTester) executeSingleDirectory(
 	for _, name := range fileNames {
 		path := dirName + "/" + name
 
-		ok := regtester.executeSinglePath(path)
+		ok := rt.executeSinglePath(path)
 		if !ok {
 			passed = false
 		}
@@ -297,18 +292,18 @@ func (regtester *RegTester) executeSingleDirectory(
 	// multiply announce.
 	if hasCaseSubdirectories {
 		if passed {
-			if !regtester.plainMode {
+			if !rt.plainMode {
 				fmt.Printf("%s %s\n", colorizer.MaybeColorizePass("PASS", true), dirName)
 			}
 		} else {
-			if !regtester.plainMode {
+			if !rt.plainMode {
 				fmt.Printf("%s %s\n", colorizer.MaybeColorizeFail("FAIL", true), dirName)
 			}
 		}
 	}
 
-	if !regtester.plainMode {
-		if !hasCaseSubdirectories && regtester.verbosityLevel >= 2 {
+	if !rt.plainMode {
+		if !hasCaseSubdirectories && rt.verbosityLevel >= 2 {
 			fmt.Printf("%s END   %s/\n", MajorSeparator, dirName)
 			fmt.Println()
 		}
@@ -317,7 +312,6 @@ func (regtester *RegTester) executeSingleDirectory(
 	return passed, hasCaseSubdirectories
 }
 
-// ----------------------------------------------------------------
 // Sees if a directory contains a single test case. If so, we don't want to
 // print a banner at start and end at the default verbosity level.  In order to
 // manage print volume, we only want to print for directories-of-cases (next
@@ -326,7 +320,7 @@ func (regtester *RegTester) executeSingleDirectory(
 // TODO: don't print container-of-containers, via entries.any.isCaseDirectory
 // or somesuch.
 
-func (regtester *RegTester) hasCaseSubdirectories(
+func (rt *RegTester) hasCaseSubdirectories(
 	dirName string,
 ) ([]string, bool) {
 	f, err := os.Open(dirName)
@@ -345,24 +339,23 @@ func (regtester *RegTester) hasCaseSubdirectories(
 
 	for _, name := range names {
 		path := dirName + string(filepath.Separator) + name
-		if regtester.isCaseDirectory(path) {
+		if rt.isCaseDirectory(path) {
 			return names, true
 		}
 	}
 	return names, false
 }
 
-func (regtester *RegTester) isCaseDirectory(
+func (rt *RegTester) isCaseDirectory(
 	dirName string,
 ) bool {
 	cmdFilePath := dirName + string(filepath.Separator) + CmdName
-	return regtester.FileExists(cmdFilePath)
+	return rt.FileExists(cmdFilePath)
 }
 
-// ----------------------------------------------------------------
 // This is the main regression-test logic for a single .cmd file (a single mlr
 // invocation) and its associated supporting files.
-func (regtester *RegTester) executeSingleCmdFile(
+func (rt *RegTester) executeSingleCmdFile(
 	cmdFilePath string,
 	verbosityLevel int,
 ) bool {
@@ -405,7 +398,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 	// Not slash := string(filepath.Separator)
 	slash := "/"
 
-	cmd, err := regtester.loadFile(cmdFilePath, caseDir)
+	cmd, err := rt.loadFile(cmdFilePath, caseDir)
 	if err != nil {
 		if verbosityLevel >= 2 {
 			fmt.Printf("%s: %v\n", cmdFilePath, err)
@@ -425,19 +418,19 @@ func (regtester *RegTester) executeSingleCmdFile(
 		fmt.Println("Command:")
 		fmt.Println(cmd)
 
-		mlr, err := regtester.loadFile(mlrFileName, caseDir)
+		mlr, err := rt.loadFile(mlrFileName, caseDir)
 		if err == nil {
 			fmt.Println("Miller DSL script:")
 			fmt.Println(mlr)
 		}
 	}
 
-	if regtester.plainMode {
+	if rt.plainMode {
 		fmt.Println("----------------------------------------------------------------")
 		fmt.Println(cmd)
 
 		scriptFileName := caseDir + slash + ScriptName
-		scriptContents, err := regtester.loadFile(scriptFileName, caseDir)
+		scriptContents, err := rt.loadFile(scriptFileName, caseDir)
 		if err == nil {
 			fmt.Println(scriptContents)
 		}
@@ -445,7 +438,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 
 	// The .env needn't exist (most test cases don't have one) in which case
 	// the returned map will be empty.
-	envKeyValuePairs, err := regtester.loadEnvFile(envFileName, caseDir)
+	envKeyValuePairs, err := rt.loadEnvFile(envFileName, caseDir)
 	if err != nil {
 		fmt.Println(err)
 		return false
@@ -453,7 +446,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 
 	// The .precopy needn't exist (most test cases don't have one) in which case
 	// the returned map will be empty.
-	preCopySrcDestPairs, err := regtester.loadStringPairFile(preCopyFileName, caseDir)
+	preCopySrcDestPairs, err := rt.loadStringPairFile(preCopyFileName, caseDir)
 	if err != nil {
 		fmt.Println(err)
 		return false
@@ -483,7 +476,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 		if verbosityLevel >= 3 {
 			fmt.Printf("%s: copy %s to %s\n", cmdFilePath, src, dst)
 		}
-		err := regtester.copyFile(src, dst, caseDir)
+		err := rt.copyFile(src, dst, caseDir)
 		if err != nil {
 			fmt.Printf("%s: %v\n", dst, err)
 			passed = false
@@ -492,7 +485,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 
 	// ****************************************************************
 	// HERE IS WHERE WE RUN THE MILLER COMMAND LINE FOR THE TEST CASE
-	actualStdout, actualStderr, actualExitCode := RunMillerCommand(regtester.exeName, cmd)
+	actualStdout, actualStderr, actualExitCode := RunMillerCommand(rt.exeName, cmd)
 	// ****************************************************************
 
 	// Unset any case-specific environment variables after running the case.
@@ -509,13 +502,13 @@ func (regtester *RegTester) executeSingleCmdFile(
 
 	// The .postcmp needn't exist (most test cases don't have one) in which case
 	// the returned map will be empty.
-	postCompareExpectedActualPairs, err := regtester.loadStringPairFile(postCompareFileName, caseDir)
+	postCompareExpectedActualPairs, err := rt.loadStringPairFile(postCompareFileName, caseDir)
 	if err != nil {
 		fmt.Println(err)
 		return false
 	}
 
-	if regtester.doPopulate {
+	if rt.doPopulate {
 		// Populate mode, not verify mode: write out the actual
 		// stdout/stderr/exit-code to disk as expected values for subsequent
 		// runs.
@@ -525,23 +518,23 @@ func (regtester *RegTester) executeSingleCmdFile(
 		actualStderr = strings.ReplaceAll(actualStderr, "\r\n", "\n")
 
 		// Write the .expout file
-		err = regtester.storeFile(expectedStdoutFileName, actualStdout)
+		err = rt.storeFile(expectedStdoutFileName, actualStdout)
 		if err != nil {
 			fmt.Printf("%s: %v\n", expectedStdoutFileName, err)
 			passed = false
 		} else {
-			if regtester.verbosityLevel >= 1 {
+			if rt.verbosityLevel >= 1 {
 				fmt.Printf("wrote %s\n", expectedStdoutFileName)
 			}
 		}
 
 		// Write the .experr file
-		err = regtester.storeFile(expectedStderrFileName, actualStderr)
+		err = rt.storeFile(expectedStderrFileName, actualStderr)
 		if err != nil {
 			fmt.Printf("%s: %v\n", expectedStderrFileName, err)
 			passed = false
 		} else {
-			if regtester.verbosityLevel >= 1 {
+			if rt.verbosityLevel >= 1 {
 				fmt.Printf("wrote %s\n", expectedStdoutFileName)
 			}
 		}
@@ -551,12 +544,12 @@ func (regtester *RegTester) executeSingleCmdFile(
 			// Remove it, if it exists.
 			os.Remove(expectFailFileName)
 		} else {
-			err = regtester.storeFile(expectFailFileName, "")
+			err = rt.storeFile(expectFailFileName, "")
 			if err != nil {
 				fmt.Printf("%s: %v\n", expectedStderrFileName, err)
 				passed = false
 			} else {
-				if regtester.verbosityLevel >= 1 {
+				if rt.verbosityLevel >= 1 {
 					fmt.Printf("wrote %s\n", expectedStdoutFileName)
 				}
 			}
@@ -566,7 +559,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 			expectedFileName := pair.first
 			actualFileName := pair.second
 
-			err := regtester.copyFile(actualFileName, expectedFileName, caseDir)
+			err := rt.copyFile(actualFileName, expectedFileName, caseDir)
 			if err != nil {
 				fmt.Printf("Could not copy %s to %s: %v\n", actualFileName, expectedFileName, err)
 				passed = false
@@ -580,7 +573,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 		// Verify mode, not populate mode: check actuals against expecteds
 
 		// Load the .expout file
-		expectedStdout, err := regtester.loadFile(expectedStdoutFileName, caseDir)
+		expectedStdout, err := rt.loadFile(expectedStdoutFileName, caseDir)
 		if err != nil {
 			if verbosityLevel >= 2 {
 				fmt.Printf("%s: %v\n", expectedStdoutFileName, err)
@@ -589,7 +582,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 		}
 
 		// Load the .experr file
-		expectedStderr, err := regtester.loadFile(expectedStderrFileName, caseDir)
+		expectedStderr, err := rt.loadFile(expectedStderrFileName, caseDir)
 		if err != nil {
 			if verbosityLevel >= 2 {
 				fmt.Printf("%s: %v\n", expectedStderrFileName, err)
@@ -599,11 +592,11 @@ func (regtester *RegTester) executeSingleCmdFile(
 
 		// Load the .should-fail file
 		expectedExitCode := 0
-		if regtester.FileExists(expectFailFileName) {
+		if rt.FileExists(expectFailFileName) {
 			expectedExitCode = 1
 		}
 
-		if regtester.plainMode {
+		if rt.plainMode {
 			fmt.Print(actualStdout)
 			fmt.Print(actualStderr)
 			fmt.Println()
@@ -686,7 +679,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 		for _, pair := range postCompareExpectedActualPairs {
 			expectedFileName := pair.first
 			actualFileName := pair.second
-			ok, expectedContents, actualContents, err := regtester.compareFiles(expectedFileName, actualFileName, caseDir)
+			ok, expectedContents, actualContents, err := rt.compareFiles(expectedFileName, actualFileName, caseDir)
 			if err != nil {
 				fmt.Printf("%s: %v\n", cmdFilePath, err)
 				passed = false
@@ -750,7 +743,7 @@ func (regtester *RegTester) executeSingleCmdFile(
 	return passed
 }
 
-func (regtester *RegTester) FileExists(fileName string) bool {
+func (rt *RegTester) FileExists(fileName string) bool {
 	fileInfo, err := os.Stat(fileName)
 	if err != nil {
 		return false
@@ -758,7 +751,7 @@ func (regtester *RegTester) FileExists(fileName string) bool {
 	return !fileInfo.IsDir()
 }
 
-func (regtester *RegTester) loadFile(
+func (rt *RegTester) loadFile(
 	fileName string,
 	caseDir string,
 ) (string, error) {
@@ -769,11 +762,11 @@ func (regtester *RegTester) loadFile(
 	contents := string(byteContents)
 	contents = strings.ReplaceAll(contents, "${CASEDIR}", caseDir)
 	contents = strings.ReplaceAll(contents, "${PATHSEP}", string(os.PathSeparator))
-	contents = strings.ReplaceAll(contents, "${MLR}", regtester.exeName)
+	contents = strings.ReplaceAll(contents, "${MLR}", rt.exeName)
 	return contents, nil
 }
 
-func (regtester *RegTester) storeFile(
+func (rt *RegTester) storeFile(
 	fileName string,
 	contents string,
 ) error {
@@ -784,32 +777,32 @@ func (regtester *RegTester) storeFile(
 	return nil
 }
 
-func (regtester *RegTester) copyFile(
+func (rt *RegTester) copyFile(
 	src string,
 	dst string,
 	caseDir string,
 ) error {
-	contents, err := regtester.loadFile(src, caseDir)
+	contents, err := rt.loadFile(src, caseDir)
 	if err != nil {
 		return err
 	}
-	err = regtester.storeFile(dst, contents)
+	err = rt.storeFile(dst, contents)
 	if err != nil {
 		return err
 	}
 	return nil
 }
 
-func (regtester *RegTester) compareFiles(
+func (rt *RegTester) compareFiles(
 	expectedFileName string,
 	actualFileName string,
 	caseDir string,
 ) (bool, string, string, error) {
-	expectedContents, err := regtester.loadFile(expectedFileName, caseDir)
+	expectedContents, err := rt.loadFile(expectedFileName, caseDir)
 	if err != nil {
 		return false, "", "", err
 	}
-	actualContents, err := regtester.loadFile(actualFileName, caseDir)
+	actualContents, err := rt.loadFile(actualFileName, caseDir)
 	if err != nil {
 		return false, "", "", err
 	}
@@ -820,7 +813,7 @@ func (regtester *RegTester) compareFiles(
 	return expectedContents == actualContents, expectedContents, actualContents, nil
 }
 
-func (regtester *RegTester) loadEnvFile(
+func (rt *RegTester) loadEnvFile(
 	filename string,
 	caseDir string,
 ) (*lib.OrderedMap[string], error) {
@@ -832,7 +825,7 @@ func (regtester *RegTester) loadEnvFile(
 	}
 
 	// If the file does exist and isn't loadable, that's an error.
-	contents, err := regtester.loadFile(filename, caseDir)
+	contents, err := rt.loadFile(filename, caseDir)
 	if err != nil {
 		return nil, err
 	}
@@ -856,11 +849,11 @@ func (regtester *RegTester) loadEnvFile(
 	return keyValuePairs, nil
 }
 
-func (regtester *RegTester) loadStringPairFile(
+func (rt *RegTester) loadStringPairFile(
 	filename string,
 	caseDir string,
 ) ([]stringPair, error) {
-	pairs := make([]stringPair, 0)
+	pairs := []stringPair{}
 	// If the file doesn't exist that's the normal case -- most cases do not
 	// have a .precopy or .postcmp file.
 	_, err := os.Stat(filename)
@@ -869,12 +862,12 @@ func (regtester *RegTester) loadStringPairFile(
 	}
 
 	// If the file does exist and isn't loadable, that's an error.
-	contents, err := regtester.loadFile(filename, caseDir)
+	contents, err := rt.loadFile(filename, caseDir)
 	if err != nil {
 		return nil, err
 	}
 
-	pairs = make([]stringPair, 0)
+	pairs = []stringPair{}
 	lines := strings.Split(contents, "\n")
 	for _, line := range lines {
 		line = strings.TrimSuffix(line, "\r")
diff --git a/pkg/terminals/repl/dsl.go b/pkg/terminals/repl/dsl.go
index 7f70826b2..6922f03f4 100644
--- a/pkg/terminals/repl/dsl.go
+++ b/pkg/terminals/repl/dsl.go
@@ -1,4 +1,3 @@
-// ================================================================
 // This is the handler for taking DSL statements typed in interactively by the
 // user, parsing them to an AST, building a CST from the AST, and executing the
 // CST. It also handles DSL statements invoked using ':load' or multi-line '<<'
@@ -15,7 +14,6 @@
 //   blocks, the statement(s) is/are executed immediately for interactive mode,
 //   else populated into the CST's main-statements block for load-from-file
 //   multi-line mode.
-// ================================================================
 
 package repl
 
diff --git a/pkg/terminals/repl/entry.go b/pkg/terminals/repl/entry.go
index 873edb736..17f2b5b11 100644
--- a/pkg/terminals/repl/entry.go
+++ b/pkg/terminals/repl/entry.go
@@ -1,4 +1,3 @@
-// ================================================================
 // This is the shell command-line entry point to the Miller REPL command line.
 // E.g. at the shell prompt, you type 'mlr repl --json' -- this file will parse
 // that.  It will then hand off control to a REPL session which will handle all
@@ -17,7 +16,6 @@
 //   "pid": 12345
 // }
 // [mlr] :quit
-// ================================================================
 
 package repl
 
@@ -173,7 +171,7 @@ func ReplMain(args []string) int {
 		recordOutputStream,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -184,14 +182,14 @@ func ReplMain(args []string) int {
 
 	err = repl.handleSession(os.Stdin)
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "mlr %s: %v", repl.replName, err)
+		fmt.Fprintf(os.Stderr, "mlr %s: %v\n", repl.replName, err)
 		os.Exit(1)
 	}
 
 	repl.bufferedRecordOutputStream.Flush()
 	err = repl.closeBufferedOutputStream()
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "mlr %s: %v", repl.replName, err)
+		fmt.Fprintf(os.Stderr, "mlr %s: %v\n", repl.replName, err)
 		os.Exit(1)
 	}
 	return 0
diff --git a/pkg/terminals/repl/prompt.go b/pkg/terminals/repl/prompt.go
index be2de0e10..76567fd0e 100644
--- a/pkg/terminals/repl/prompt.go
+++ b/pkg/terminals/repl/prompt.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Handling for default and customized banners/prompts for the Miller REPL.
-// ================================================================
 
 package repl
 
@@ -27,9 +25,8 @@ func getInputIsTerminal() bool {
 		// outside MSYS2. So in that case we simply return true so that the mlr
 		// repl has a prompt.
 		return true
-	} else {
-		return term.IsTerminal(int(os.Stdin.Fd()))
 	}
+	return term.IsTerminal(int(os.Stdin.Fd()))
 }
 
 func getPrompt1() string {
diff --git a/pkg/terminals/repl/session.go b/pkg/terminals/repl/session.go
index e3cada64a..8ef28dcde 100644
--- a/pkg/terminals/repl/session.go
+++ b/pkg/terminals/repl/session.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Top-level handler for a REPL session, including setup/construction, and
 // ingesting command-lines. Command-line strings are triaged and send off to
 // the appropriate handlers: DSL parse/execute if the command is a DSL statement
@@ -11,7 +10,6 @@
 //
 // is a delight. :)
 //
-// ================================================================
 
 package repl
 
@@ -86,7 +84,7 @@ func NewRepl(
 
 	// If there was a --load/--mload on the command line, load those DSL strings here (e.g.
 	// someone's local function library).
-	dslStrings := make([]string, 0)
+	dslStrings := []string{}
 	for _, filename := range options.DSLPreloadFileNames {
 		theseDSLStrings, err := lib.LoadStringsFromFileOrDir(filename, ".mlr")
 		if err != nil {
@@ -205,14 +203,13 @@ func (repl *Repl) handleSession(istream *os.File) error {
 			// We need the non-trimmed line here since the DSL syntax for comments is '#.*\n'.
 			err = repl.handleDSLStringImmediate(line, repl.doWarnings)
 			if err != nil {
-				fmt.Fprintln(os.Stderr, err)
+				fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			}
 		}
 	}
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Context: the "<" or "<<" has already been seen. we read until ">" or ">>".
 
 func (repl *Repl) handleMultiLine(
@@ -240,14 +237,14 @@ func (repl *Repl) handleMultiLine(
 	}
 	dslString := buffer.String()
 
-	var err error = nil
+	var err error
 	if doImmediate {
 		err = repl.handleDSLStringImmediate(dslString, repl.doWarnings)
 	} else {
 		err = repl.handleDSLStringBulk(dslString, repl.doWarnings)
 	}
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 	}
 
 	return nil
diff --git a/pkg/terminals/repl/types.go b/pkg/terminals/repl/types.go
index 4f79914e7..c574f0965 100644
--- a/pkg/terminals/repl/types.go
+++ b/pkg/terminals/repl/types.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Data types for the Miller REPL.
-// ================================================================
 
 package repl
 
diff --git a/pkg/terminals/repl/verbs.go b/pkg/terminals/repl/verbs.go
index 83027876e..446afbf28 100644
--- a/pkg/terminals/repl/verbs.go
+++ b/pkg/terminals/repl/verbs.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Handlers for non-DSL statements like ':open foo.dat' or ':help'.
-// ================================================================
 
 package repl
 
@@ -17,7 +15,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ----------------------------------------------------------------
 // Types for the lookup table.
 
 // Handlers should return false if they want their usage function to be called.
@@ -59,7 +56,6 @@ func init() {
 	}
 }
 
-// ----------------------------------------------------------------
 // No hash-table acceleration; things here are small, and the tool is interactive.
 func (repl *Repl) findHandler(verbName string) *handlerInfo {
 	for _, entry := range handlerLookupTable {
@@ -78,9 +74,8 @@ func (repl *Repl) showUsageForHandler(verbName string) bool {
 		fmt.Println(colorizer.MaybeColorizeHelp(verbName, true))
 		nonDSLHandler.usageFunc(repl)
 		return true
-	} else {
-		return false
 	}
+	return false
 }
 
 func (repl *Repl) showUsageForHandlerApproximate(searchString string) bool {
@@ -97,7 +92,6 @@ func (repl *Repl) showUsageForHandlerApproximate(searchString string) bool {
 	return foundAny
 }
 
-// ----------------------------------------------------------------
 // Handles a single non-DSL statement like ':open foo.dat' or ':help'.
 func (repl *Repl) handleNonDSLLine(trimmedLine string) bool {
 	args := strings.Fields(trimmedLine)
@@ -284,7 +278,7 @@ func handleRead(repl *Repl, args []string) bool {
 	}
 
 	var recordsAndContexts []*types.RecordAndContext // list of *types.RecordAndContext
-	var err error = nil
+	var err error
 
 	select {
 	case recordsAndContexts = <-repl.readerChannel:
@@ -365,17 +359,16 @@ func handleSkip(repl *Repl, args []string) bool {
 		return true
 	} else if args[0] != "until" && args[0] != "u" {
 		return false
-	} else {
-		args := args[1:]
-		dslString := strings.Join(args, " ")
-		// If they say ':skip until intr' then we use a DSL string of 'false',
-		// i.e. skip until they type control-C.
-		if len(args) == 1 && args[0] == "intr" {
-			dslString = "false"
-		}
-		handleSkipOrProcessUntil(repl, dslString, false)
-		return true
 	}
+	args = args[1:]
+	dslString := strings.Join(args, " ")
+	// If they say ':skip until intr' then we use a DSL string of 'false',
+	// i.e. skip until they type control-C.
+	if len(args) == 1 && args[0] == "intr" {
+		dslString = "false"
+	}
+	handleSkipOrProcessUntil(repl, dslString, false)
+	return true
 }
 
 func usageProcess(repl *Repl) {
@@ -413,22 +406,21 @@ func handleProcess(repl *Repl, args []string) bool {
 		return true
 	} else if args[0] != "until" && args[0] != "u" {
 		return false
-	} else {
-		args := args[1:]
-		dslString := strings.Join(args, " ")
-		// If they say ':process until intr' then we use a DSL string of 'false',
-		// i.e. skip until they type control-C.
-		if len(args) == 1 && args[0] == "intr" {
-			dslString = "false"
-		}
-		handleSkipOrProcessUntil(repl, dslString, true)
-		return true
 	}
+	args = args[1:]
+	dslString := strings.Join(args, " ")
+	// If they say ':process until intr' then we use a DSL string of 'false',
+	// i.e. skip until they type control-C.
+	if len(args) == 1 && args[0] == "intr" {
+		dslString = "false"
+	}
+	handleSkipOrProcessUntil(repl, dslString, true)
+	return true
 }
 
 func handleSkipOrProcessN(repl *Repl, n int64, processingNotSkipping bool) {
 	var recordsAndContexts []*types.RecordAndContext // list of *types.RecordAndContext
-	var err error = nil
+	var err error
 
 	for i := int64(1); i <= n; i++ {
 		select {
diff --git a/pkg/terminals/terminals.go b/pkg/terminals/terminals.go
index 9e11e1e71..d88dcf709 100644
--- a/pkg/terminals/terminals.go
+++ b/pkg/terminals/terminals.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Support for Miller regression testing. Originally bash scripts; ported to Go
 // for ease of Windows-native testing.
-// ================================================================
 
 package terminals
 
diff --git a/pkg/transformers/aaa_chain_transformer.go b/pkg/transformers/aaa_chain_transformer.go
index e5c98824c..f3b174b61 100644
--- a/pkg/transformers/aaa_chain_transformer.go
+++ b/pkg/transformers/aaa_chain_transformer.go
@@ -8,14 +8,12 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ================================================================
 // ChainTransformer is a refinement of Miller's high-level sketch in stream.go.
 // As far as stream.go is concerned, the transformer-chain is a box which reads
 // from an input-record channel (from the record-reader object) and writes to
 // an output-record channel (to the record-writer object). Inside that box is a
 // bit more complexity, including channels between transformers in the chain.
 //
-// ----------------------------------------------------------------
 // Channel structure from outside the box:
 // * readerInputRecordChannel "ichan" passes records from the record-reader
 //   to the transformer chain.
@@ -38,7 +36,6 @@ import (
 //     v
 //   Record-writer
 //
-// ----------------------------------------------------------------
 // Channel structure from inside the box:
 //
 //   Record-reader
@@ -60,7 +57,6 @@ import (
 //     v
 //   Record-writer
 //
-// ----------------------------------------------------------------
 // Each transformer has four channels from its point of view:
 //
 // | irchan  odchan |
@@ -95,7 +91,6 @@ import (
 //   o Otherwise it's an intermediary channel connected to transformer i-1's idchan,
 //     so transformer i can produce a downstream-done flag.
 //
-// ----------------------------------------------------------------
 // Handling in practice:
 //
 // * Most verbs pass a downstrem-done flag on their idchan upstream to their odchan.
@@ -117,7 +112,6 @@ import (
 // * In head.go, tee.go, and seqgen.go you will see specific handling of
 //   reading idchan and writing odchan.
 //
-// ----------------------------------------------------------------
 // TESTING
 //
 // * This is a bit awkward with regard to regression-test -- we don't want a
@@ -134,7 +128,6 @@ import (
 //     check `wc -l foo.txt` is 100 and `wc -l bar.txt` is 10
 //   mlr seqgen --stop 100000000 then head -n 10
 //
-// ================================================================
 
 // ChainTransformer is a refinement of Miller's high-level sketch in stream.go.
 // While stream.go sees goroutines for record reader, transformer chain, and
@@ -145,7 +138,7 @@ import (
 func ChainTransformer(
 	readerRecordChannel <-chan []*types.RecordAndContext, // list of *types.RecordAndContext
 	readerDownstreamDoneChannel chan<- bool, // for mlr head -- see also stream.go
-	recordTransformers []IRecordTransformer, // not *recordTransformer since this is an interface
+	recordTransformers []RecordTransformer, // not *recordTransformer since this is an interface
 	writerRecordChannel chan<- []*types.RecordAndContext, // list of *types.RecordAndContext
 	options *cli.TOptions,
 ) {
@@ -197,7 +190,7 @@ func ChainTransformer(
 }
 
 func runSingleTransformer(
-	recordTransformer IRecordTransformer,
+	recordTransformer RecordTransformer,
 	isFirstInChain bool,
 	inputRecordChannel <-chan []*types.RecordAndContext, // list of *types.RecordAndContext
 	outputRecordChannel chan<- []*types.RecordAndContext, // list of *types.RecordAndContext
@@ -225,7 +218,7 @@ func runSingleTransformer(
 // Returns true on end of record stream
 func runSingleTransformerBatch(
 	inputRecordsAndContexts []*types.RecordAndContext, // list of types.RecordAndContext
-	recordTransformer IRecordTransformer,
+	recordTransformer RecordTransformer,
 	isFirstInChain bool,
 	outputRecordChannel chan<- []*types.RecordAndContext, // list of *types.RecordAndContext
 	inputDownstreamDoneChannel <-chan bool,
diff --git a/pkg/transformers/aaa_record_transformer.go b/pkg/transformers/aaa_record_transformer.go
index 009d0d2cf..9067e38ee 100644
--- a/pkg/transformers/aaa_record_transformer.go
+++ b/pkg/transformers/aaa_record_transformer.go
@@ -7,10 +7,10 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// IRecordTransformer is the interface satisfied by all transformers, i.e.,
+// RecordTransformer is the interface satisfied by all transformers, i.e.,
 // Miller verbs. See stream.go for context on the channels, as well as for
 // context on end-of-record-stream signaling.
-type IRecordTransformer interface {
+type RecordTransformer interface {
 	Transform(
 		inrecAndContext *types.RecordAndContext,
 		outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -42,7 +42,7 @@ type TransformerParseCLIFunc func(
 	args []string,
 	mainOptions *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer
+) RecordTransformer
 
 type TransformerSetup struct {
 	Verb         string
@@ -66,8 +66,6 @@ func HandleDefaultDownstreamDone(
 	select {
 	case b := <-inputDownstreamDoneChannel:
 		outputDownstreamDoneChannel <- b
-		break
 	default:
-		break
 	}
 }
diff --git a/pkg/transformers/altkv.go b/pkg/transformers/altkv.go
index 7ab3aa369..f842460e3 100644
--- a/pkg/transformers/altkv.go
+++ b/pkg/transformers/altkv.go
@@ -35,7 +35,7 @@ func transformerAltkvParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -55,10 +55,9 @@ func transformerAltkvParseCLI(
 			transformerAltkvUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerAltkvUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerAltkvUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -68,7 +67,7 @@ func transformerAltkvParseCLI(
 
 	transformer, err := NewTransformerAltkv()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -83,7 +82,6 @@ func NewTransformerAltkv() (*TransformerAltkv, error) {
 	return tr, nil
 }
 
-
 func (tr *TransformerAltkv) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/bar.go b/pkg/transformers/bar.go
index 0bda6d6a1..b1361396c 100644
--- a/pkg/transformers/bar.go
+++ b/pkg/transformers/bar.go
@@ -54,7 +54,7 @@ func transformerBarParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -132,7 +132,7 @@ func transformerBarParseCLI(
 		blankString,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -190,7 +190,7 @@ func NewTransformerBar(
 
 	if doAuto {
 		tr.recordTransformerFunc = tr.processAuto
-		tr.recordsForAutoMode = make([]*types.RecordAndContext, 0)
+		tr.recordsForAutoMode = []*types.RecordAndContext{}
 	} else {
 		tr.recordTransformerFunc = tr.processNoAuto
 		tr.recordsForAutoMode = nil
@@ -199,7 +199,6 @@ func NewTransformerBar(
 	return tr, nil
 }
 
-
 func (tr *TransformerBar) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/bootstrap.go b/pkg/transformers/bootstrap.go
index 811c24737..1f196d6e4 100644
--- a/pkg/transformers/bootstrap.go
+++ b/pkg/transformers/bootstrap.go
@@ -41,7 +41,7 @@ func transformerBootstrapParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -80,7 +80,7 @@ func transformerBootstrapParseCLI(
 
 	transformer, err := NewTransformerBootstrap(nout)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -94,13 +94,12 @@ type TransformerBootstrap struct {
 
 func NewTransformerBootstrap(nout int64) (*TransformerBootstrap, error) {
 	tr := &TransformerBootstrap{
-		recordsAndContexts: make([]*types.RecordAndContext, 0),
+		recordsAndContexts: []*types.RecordAndContext{},
 		nout:               nout,
 	}
 	return tr, nil
 }
 
-
 func (tr *TransformerBootstrap) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/case.go b/pkg/transformers/case.go
index 115bbdad2..7faafc6ad 100644
--- a/pkg/transformers/case.go
+++ b/pkg/transformers/case.go
@@ -53,7 +53,7 @@ func transformerCaseParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -109,7 +109,7 @@ func transformerCaseParseCLI(
 
 	transformer, err := NewTransformerCase(which, fieldNames, style)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/cat.go b/pkg/transformers/cat.go
index 395d5fc6d..7601cbcd8 100644
--- a/pkg/transformers/cat.go
+++ b/pkg/transformers/cat.go
@@ -39,7 +39,7 @@ func transformerCatParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -101,7 +101,7 @@ func transformerCatParseCLI(
 		doFileNum,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -157,7 +157,6 @@ func NewTransformerCat(
 	return tr, nil
 }
 
-
 func (tr *TransformerCat) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/check.go b/pkg/transformers/check.go
index 144e5d63b..e2571040d 100644
--- a/pkg/transformers/check.go
+++ b/pkg/transformers/check.go
@@ -38,7 +38,7 @@ func transformerCheckParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -58,10 +58,9 @@ func transformerCheckParseCLI(
 			transformerCheckUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerCheckUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerCheckUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -71,7 +70,7 @@ func transformerCheckParseCLI(
 
 	transformer, err := NewTransformerCheck()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/clean_whitespace.go b/pkg/transformers/clean_whitespace.go
index 528ac463d..2c4a583fb 100644
--- a/pkg/transformers/clean_whitespace.go
+++ b/pkg/transformers/clean_whitespace.go
@@ -44,7 +44,7 @@ func transformerCleanWhitespaceParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	doKeys := true
 	doValues := true
@@ -95,7 +95,7 @@ func transformerCleanWhitespaceParseCLI(
 		doValues,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/count.go b/pkg/transformers/count.go
index 66ec2e1d1..237cf51e1 100644
--- a/pkg/transformers/count.go
+++ b/pkg/transformers/count.go
@@ -40,7 +40,7 @@ func transformerCountParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -91,7 +91,7 @@ func transformerCountParseCLI(
 		outputFieldName,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -143,7 +143,6 @@ func NewTransformerCount(
 	return tr, nil
 }
 
-
 func (tr *TransformerCount) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/count_similar.go b/pkg/transformers/count_similar.go
index a48536e08..fee147674 100644
--- a/pkg/transformers/count_similar.go
+++ b/pkg/transformers/count_similar.go
@@ -38,7 +38,7 @@ func transformerCountSimilarParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -89,7 +89,7 @@ func transformerCountSimilarParseCLI(
 		counterFieldName,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -117,7 +117,6 @@ func NewTransformerCountSimilar(
 	return tr, nil
 }
 
-
 func (tr *TransformerCountSimilar) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -135,7 +134,7 @@ func (tr *TransformerCountSimilar) Transform(
 
 		recordListForGroup := tr.recordListsByGroup.Get(groupingKey)
 		if recordListForGroup == nil { // first time
-			records := make([]*types.RecordAndContext, 0)
+			records := []*types.RecordAndContext{}
 			recordListForGroup = &records
 			tr.recordListsByGroup.Put(groupingKey, recordListForGroup)
 		}
diff --git a/pkg/transformers/cut.go b/pkg/transformers/cut.go
index e394987f2..bf588334a 100644
--- a/pkg/transformers/cut.go
+++ b/pkg/transformers/cut.go
@@ -52,7 +52,7 @@ func transformerCutParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -116,7 +116,7 @@ func transformerCutParseCLI(
 		doRegexes,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -179,7 +179,6 @@ func NewTransformerCut(
 	return tr, nil
 }
 
-
 func (tr *TransformerCut) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -190,7 +189,6 @@ func (tr *TransformerCut) Transform(
 	tr.recordTransformerFunc(inrecAndContext, outputRecordsAndContexts, inputDownstreamDoneChannel, outputDownstreamDoneChannel)
 }
 
-// ----------------------------------------------------------------
 // mlr cut -f a,b,c
 func (tr *TransformerCut) includeWithInputOrder(
 	inrecAndContext *types.RecordAndContext,
@@ -215,7 +213,6 @@ func (tr *TransformerCut) includeWithInputOrder(
 	}
 }
 
-// ----------------------------------------------------------------
 // mlr cut -o -f a,b,c
 func (tr *TransformerCut) includeWithArgOrder(
 	inrecAndContext *types.RecordAndContext,
@@ -239,7 +236,6 @@ func (tr *TransformerCut) includeWithArgOrder(
 	}
 }
 
-// ----------------------------------------------------------------
 // mlr cut -x -f a,b,c
 func (tr *TransformerCut) exclude(
 	inrecAndContext *types.RecordAndContext,
diff --git a/pkg/transformers/decimate.go b/pkg/transformers/decimate.go
index f20ab31dc..9a5790019 100644
--- a/pkg/transformers/decimate.go
+++ b/pkg/transformers/decimate.go
@@ -37,7 +37,7 @@ func transformerDecimateParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -97,7 +97,7 @@ func transformerDecimateParseCLI(
 		groupByFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -134,7 +134,6 @@ func NewTransformerDecimate(
 	return tr, nil
 }
 
-
 func (tr *TransformerDecimate) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/fill_down.go b/pkg/transformers/fill_down.go
index 0328a0660..a53b3fb08 100644
--- a/pkg/transformers/fill_down.go
+++ b/pkg/transformers/fill_down.go
@@ -44,7 +44,7 @@ func transformerFillDownParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -103,7 +103,7 @@ func transformerFillDownParseCLI(
 		onlyIfAbsent,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -141,7 +141,6 @@ func NewTransformerFillDown(
 	return tr, nil
 }
 
-
 func (tr *TransformerFillDown) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/fill_empty.go b/pkg/transformers/fill_empty.go
index 67658913b..ef8eaf7c3 100644
--- a/pkg/transformers/fill_empty.go
+++ b/pkg/transformers/fill_empty.go
@@ -36,7 +36,7 @@ func transformerFillEmptyParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -79,7 +79,7 @@ func transformerFillEmptyParseCLI(
 
 	transformer, err := NewTransformerFillEmpty(fillString, inferType)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -103,7 +103,6 @@ func NewTransformerFillEmpty(
 	return tr, nil
 }
 
-
 func (tr *TransformerFillEmpty) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/flatten.go b/pkg/transformers/flatten.go
index 7d9c6c942..90a0d3bc4 100644
--- a/pkg/transformers/flatten.go
+++ b/pkg/transformers/flatten.go
@@ -39,7 +39,7 @@ func transformerFlattenParseCLI(
 	args []string,
 	options *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -86,7 +86,7 @@ func transformerFlattenParseCLI(
 		fieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -127,7 +127,6 @@ func NewTransformerFlatten(
 	return retval, nil
 }
 
-
 func (tr *TransformerFlatten) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/format_values.go b/pkg/transformers/format_values.go
index b39450838..452640738 100644
--- a/pkg/transformers/format_values.go
+++ b/pkg/transformers/format_values.go
@@ -63,7 +63,7 @@ func transformerFormatValuesParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -116,7 +116,7 @@ func transformerFormatValuesParseCLI(
 		coerceIntToFloat,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -160,7 +160,6 @@ func NewTransformerFormatValues(
 	return tr, nil
 }
 
-
 func (tr *TransformerFormatValues) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/fraction.go b/pkg/transformers/fraction.go
index 2ef353975..dbb8f85ed 100644
--- a/pkg/transformers/fraction.go
+++ b/pkg/transformers/fraction.go
@@ -55,7 +55,7 @@ func transformerFractionParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -117,7 +117,7 @@ func transformerFractionParseCLI(
 		doCumu,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -147,7 +147,7 @@ func NewTransformerFraction(
 	doCumu bool,
 ) (*TransformerFraction, error) {
 
-	recordsAndContexts := make([]*types.RecordAndContext, 0)
+	recordsAndContexts := []*types.RecordAndContext{}
 	sums := make(map[string]map[string]*mlrval.Mlrval)
 	cumus := make(map[string]map[string]*mlrval.Mlrval)
 
@@ -184,7 +184,6 @@ func NewTransformerFraction(
 	}, nil
 }
 
-
 func (tr *TransformerFraction) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/gap.go b/pkg/transformers/gap.go
index c4a628966..4ffb705ea 100644
--- a/pkg/transformers/gap.go
+++ b/pkg/transformers/gap.go
@@ -40,7 +40,7 @@ func transformerGapParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -91,7 +91,7 @@ func transformerGapParseCLI(
 		groupByFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -131,7 +131,6 @@ func NewTransformerGap(
 	return tr, nil
 }
 
-
 func (tr *TransformerGap) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/grep.go b/pkg/transformers/grep.go
index ba07b7a78..293a76f35 100644
--- a/pkg/transformers/grep.go
+++ b/pkg/transformers/grep.go
@@ -51,7 +51,7 @@ func transformerGrepParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -122,7 +122,7 @@ func transformerGrepParseCLI(
 		valuesOnly,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -148,7 +148,6 @@ func NewTransformerGrep(
 	return tr, nil
 }
 
-
 func (tr *TransformerGrep) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/group_by.go b/pkg/transformers/group_by.go
index 7a7655ef2..06313c319 100644
--- a/pkg/transformers/group_by.go
+++ b/pkg/transformers/group_by.go
@@ -34,7 +34,7 @@ func transformerGroupByParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -54,10 +54,9 @@ func transformerGroupByParseCLI(
 			transformerGroupByUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerGroupByUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerGroupByUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	// Get the group-by field names from the command line
@@ -77,7 +76,7 @@ func transformerGroupByParseCLI(
 		groupByFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -106,7 +105,6 @@ func NewTransformerGroupBy(
 	return tr, nil
 }
 
-
 func (tr *TransformerGroupBy) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -124,7 +122,7 @@ func (tr *TransformerGroupBy) Transform(
 
 		recordListForGroup := tr.recordListsByGroup.Get(groupingKey)
 		if recordListForGroup == nil {
-			records := make([]*types.RecordAndContext, 0)
+			records := []*types.RecordAndContext{}
 			recordListForGroup = &records
 			tr.recordListsByGroup.Put(groupingKey, recordListForGroup)
 		}
diff --git a/pkg/transformers/group_like.go b/pkg/transformers/group_like.go
index 4ffedd1d6..6b2d0cab5 100644
--- a/pkg/transformers/group_like.go
+++ b/pkg/transformers/group_like.go
@@ -34,7 +34,7 @@ func transformerGroupLikeParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -54,10 +54,9 @@ func transformerGroupLikeParseCLI(
 			transformerGroupLikeUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerGroupLikeUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerGroupLikeUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -67,7 +66,7 @@ func transformerGroupLikeParseCLI(
 
 	transformer, err := NewTransformerGroupLike()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -88,7 +87,6 @@ func NewTransformerGroupLike() (*TransformerGroupLike, error) {
 	return tr, nil
 }
 
-
 func (tr *TransformerGroupLike) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -103,7 +101,7 @@ func (tr *TransformerGroupLike) Transform(
 
 		recordListForGroup := tr.recordListsByGroup.Get(groupingKey)
 		if recordListForGroup == nil { // first time
-			records := make([]*types.RecordAndContext, 0)
+			records := []*types.RecordAndContext{}
 			recordListForGroup = &records
 			tr.recordListsByGroup.Put(groupingKey, recordListForGroup)
 		}
diff --git a/pkg/transformers/having_fields.go b/pkg/transformers/having_fields.go
index fb634c729..35bc5b9b9 100644
--- a/pkg/transformers/having_fields.go
+++ b/pkg/transformers/having_fields.go
@@ -61,7 +61,7 @@ func transformerHavingFieldsParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	havingFieldsCriterion := havingFieldsCriterionUnspecified
 	var fieldNames []string = nil
@@ -142,7 +142,7 @@ func transformerHavingFieldsParseCLI(
 		regexString,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -213,7 +213,6 @@ func NewTransformerHavingFields(
 	return tr, nil
 }
 
-
 func (tr *TransformerHavingFields) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/head.go b/pkg/transformers/head.go
index e0d318491..c6cd9fbe7 100644
--- a/pkg/transformers/head.go
+++ b/pkg/transformers/head.go
@@ -37,7 +37,7 @@ func transformerHeadParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -93,7 +93,7 @@ func transformerHeadParseCLI(
 		groupByFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -136,7 +136,6 @@ func NewTransformerHead(
 	return tr, nil
 }
 
-
 func (tr *TransformerHead) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/histogram.go b/pkg/transformers/histogram.go
index 14a3c157c..4ac30d31c 100644
--- a/pkg/transformers/histogram.go
+++ b/pkg/transformers/histogram.go
@@ -44,7 +44,7 @@ func transformerHistogramParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -126,7 +126,7 @@ func transformerHistogramParseCLI(
 		outputPrefix,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -190,7 +190,6 @@ func NewTransformerHistogram(
 	return tr, nil
 }
 
-
 func (tr *TransformerHistogram) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/join.go b/pkg/transformers/join.go
index efd355187..7c59de2eb 100644
--- a/pkg/transformers/join.go
+++ b/pkg/transformers/join.go
@@ -22,7 +22,6 @@ var JoinSetup = TransformerSetup{
 	IgnoresInput: false,
 }
 
-// ----------------------------------------------------------------
 // Most transformers have option-variables as individual locals within the
 // transformerXYZParseCLI function, which are passed as individual arguments to
 // the NewTransformerXYZ function. For join, things are a bit more complex
@@ -137,7 +136,7 @@ func transformerJoinParseCLI(
 	args []string,
 	mainOptions *cli.TOptions, // Options for the right-files
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -274,7 +273,7 @@ func transformerJoinParseCLI(
 
 	transformer, err := NewTransformerJoin(opts)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -327,7 +326,7 @@ func NewTransformerJoin(
 	if opts.allowUnsortedInput {
 		// Half-streaming (default) case: ingest entire left file first.
 
-		tr.leftUnpairableRecordsAndContexts = make([]*types.RecordAndContext, 0)
+		tr.leftUnpairableRecordsAndContexts = []*types.RecordAndContext{}
 		tr.leftBucketsByJoinFieldValues = lib.NewOrderedMap[*utils.JoinBucket]()
 		tr.recordTransformerFunc = tr.transformHalfStreaming
 
@@ -351,7 +350,6 @@ func NewTransformerJoin(
 	return tr, nil
 }
 
-
 func (tr *TransformerJoin) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -363,7 +361,6 @@ func (tr *TransformerJoin) Transform(
 		inputDownstreamDoneChannel, outputDownstreamDoneChannel)
 }
 
-// ----------------------------------------------------------------
 // This is for the half-streaming case. We ingest the entire left file,
 // matching each right record against those.
 func (tr *TransformerJoin) transformHalfStreaming(
@@ -461,7 +458,6 @@ func (tr *TransformerJoin) transformDoublyStreaming(
 	}
 }
 
-// ----------------------------------------------------------------
 // This is for the half-streaming case. We ingest the entire left file,
 // matching each right record against those.
 //
@@ -505,7 +501,7 @@ func (tr *TransformerJoin) ingestLeftFile() {
 		select {
 
 		case err := <-errorChannel:
-			fmt.Fprintln(os.Stderr, "mlr", ": ", err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 
 		case leftrecsAndContexts := <-readerChannel:
@@ -543,7 +539,6 @@ func (tr *TransformerJoin) ingestLeftFile() {
 	}
 }
 
-// ----------------------------------------------------------------
 // This helper method is used by the half-streaming/unsorted join, as well as
 // the doubly-streaming/sorted join.
 
@@ -604,7 +599,6 @@ func (tr *TransformerJoin) formAndEmitPairs(
 	////fmt.Println("-- pairs end") // VERBOSE
 }
 
-// ----------------------------------------------------------------
 // There are two kinds of left non-pair records: (a) those lacking the
 // specified join-keys -- can't possibly pair with anything on the right; (b)
 // those having the join-keys but not matching with a record on the right.
diff --git a/pkg/transformers/json_parse.go b/pkg/transformers/json_parse.go
index cfb46553e..ae73b0df2 100644
--- a/pkg/transformers/json_parse.go
+++ b/pkg/transformers/json_parse.go
@@ -40,7 +40,7 @@ func transformerJSONParseParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -86,7 +86,7 @@ func transformerJSONParseParseCLI(
 		keepFailed,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -124,7 +124,6 @@ func NewTransformerJSONParse(
 	return retval, nil
 }
 
-
 func (tr *TransformerJSONParse) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/json_stringify.go b/pkg/transformers/json_stringify.go
index c294fb789..e52b30822 100644
--- a/pkg/transformers/json_stringify.go
+++ b/pkg/transformers/json_stringify.go
@@ -40,7 +40,7 @@ func transformerJSONStringifyParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -96,7 +96,7 @@ func transformerJSONStringifyParseCLI(
 		fieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -134,7 +134,6 @@ func NewTransformerJSONStringify(
 	return retval, nil
 }
 
-
 func (tr *TransformerJSONStringify) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/label.go b/pkg/transformers/label.go
index 5a1e9b79e..6d0c32137 100644
--- a/pkg/transformers/label.go
+++ b/pkg/transformers/label.go
@@ -38,7 +38,7 @@ func transformerLabelParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -58,10 +58,9 @@ func transformerLabelParseCLI(
 			transformerLabelUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerLabelUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerLabelUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	// Get the label field names from the command line
@@ -81,7 +80,7 @@ func transformerLabelParseCLI(
 		newNames,
 	)
 	if err != nil {
-		fmt.Fprint(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr label: %v\n", err)
 		os.Exit(1)
 		// TODO: return nil to caller and have it exit, maybe
 	}
@@ -101,7 +100,7 @@ func NewTransformerLabel(
 	for _, newName := range newNames {
 		_, ok := uniquenessChecker[newName]
 		if ok {
-			return nil, fmt.Errorf(`mlr label: labels must be unique; got duplicate "%s"`, newName)
+			return nil, fmt.Errorf(`labels must be unique; got duplicate "%s"`, newName)
 		}
 		uniquenessChecker[newName] = true
 	}
@@ -113,7 +112,6 @@ func NewTransformerLabel(
 	return tr, nil
 }
 
-
 func (tr *TransformerLabel) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/latin1_to_utf8.go b/pkg/transformers/latin1_to_utf8.go
index db85eb842..6212c072c 100644
--- a/pkg/transformers/latin1_to_utf8.go
+++ b/pkg/transformers/latin1_to_utf8.go
@@ -36,7 +36,7 @@ func transformerLatin1ToUTF8ParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -56,10 +56,9 @@ func transformerLatin1ToUTF8ParseCLI(
 			transformerLatin1ToUTF8Usage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerLatin1ToUTF8Usage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerLatin1ToUTF8Usage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -69,7 +68,7 @@ func transformerLatin1ToUTF8ParseCLI(
 
 	transformer, err := NewTransformerLatin1ToUTF8()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -84,7 +83,6 @@ func NewTransformerLatin1ToUTF8() (*TransformerLatin1ToUTF8, error) {
 	return tr, nil
 }
 
-
 func (tr *TransformerLatin1ToUTF8) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/merge_fields.go b/pkg/transformers/merge_fields.go
index f833ff7eb..6d6c71d6e 100644
--- a/pkg/transformers/merge_fields.go
+++ b/pkg/transformers/merge_fields.go
@@ -75,15 +75,15 @@ func transformerMergeFieldsParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
 	verb := args[argi]
 	argi++
 
-	accumulatorNameList := make([]string, 0)
-	valueFieldNameList := make([]string, 0)
+	accumulatorNameList := []string{}
+	valueFieldNameList := []string{}
 	outputFieldBasename := ""
 	doWhich := e_MERGE_UNSPECIFIED
 	keepInputFields := false
@@ -171,14 +171,13 @@ func transformerMergeFieldsParseCLI(
 		keepInputFields,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
 	return transformer
 }
 
-// ----------------------------------------------------------------
 // Given: accumulate count,sum on values x,y group by a,b.
 //
 // Example input:       Example output:
@@ -306,7 +305,6 @@ func NewTransformerMergeFields(
 	return tr, nil
 }
 
-
 func (tr *TransformerMergeFields) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -441,7 +439,6 @@ func (tr *TransformerMergeFields) transformByNameRegex(
 	*outputRecordsAndContexts = append(*outputRecordsAndContexts, inrecAndContext)
 }
 
-// ----------------------------------------------------------------
 // mlr merge-fields -c in_,out_ -a sum
 // a_in_x  1     a_sum_x 3
 // a_out_x 2     b_sum_y 4
diff --git a/pkg/transformers/most_or_least_frequent.go b/pkg/transformers/most_or_least_frequent.go
index 5518eb764..a60de2e48 100644
--- a/pkg/transformers/most_or_least_frequent.go
+++ b/pkg/transformers/most_or_least_frequent.go
@@ -70,7 +70,7 @@ func transformerMostFrequentParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 	return transformerMostOrLeastFrequentParseCLI(pargi, argc, args, true, transformerMostFrequentUsage, doConstruct)
 }
 
@@ -80,7 +80,7 @@ func transformerLeastFrequentParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 	return transformerMostOrLeastFrequentParseCLI(pargi, argc, args, false, transformerLeastFrequentUsage, doConstruct)
 }
 
@@ -91,7 +91,7 @@ func transformerMostOrLeastFrequentParseCLI(
 	descending bool,
 	usageFunc TransformerUsageFunc,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -155,7 +155,7 @@ func transformerMostOrLeastFrequentParseCLI(
 		descending,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -197,7 +197,6 @@ func NewTransformerMostOrLeastFrequent(
 	return tr, nil
 }
 
-
 func (tr *TransformerMostOrLeastFrequent) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/nest.go b/pkg/transformers/nest.go
index 953d0262c..60c08733f 100644
--- a/pkg/transformers/nest.go
+++ b/pkg/transformers/nest.go
@@ -94,7 +94,7 @@ func transformerNestParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -239,7 +239,7 @@ func transformerNestParseCLI(
 		doAcrossFields,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -351,7 +351,6 @@ func (tr *TransformerNest) Transform(
 	tr.recordTransformerFunc(inrecAndContext, outputRecordsAndContexts, inputDownstreamDoneChannel, outputDownstreamDoneChannel)
 }
 
-// ----------------------------------------------------------------
 // getMatchingFieldNames returns field names matching tr.fieldRegex in record order.
 // When !tr.doRegexes, returns [tr.fieldName] if present, else [].
 func (tr *TransformerNest) getMatchingFieldNames(inrec *mlrval.Mlrmap) []string {
@@ -672,6 +671,6 @@ type tNestBucket struct {
 func newNestBucket(representative *mlrval.Mlrmap) *tNestBucket {
 	return &tNestBucket{
 		representative: representative,
-		pairs:          make([]*mlrval.Mlrmap, 0),
+		pairs:          []*mlrval.Mlrmap{},
 	}
 }
diff --git a/pkg/transformers/nothing.go b/pkg/transformers/nothing.go
index e32ed0243..76199a907 100644
--- a/pkg/transformers/nothing.go
+++ b/pkg/transformers/nothing.go
@@ -34,7 +34,7 @@ func transformerNothingParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -54,10 +54,9 @@ func transformerNothingParseCLI(
 			transformerNothingUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerNothingUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerNothingUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -67,7 +66,7 @@ func transformerNothingParseCLI(
 
 	transformer, err := NewTransformerNothing()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/put_or_filter.go b/pkg/transformers/put_or_filter.go
index 9ac4faf91..bda7434ba 100644
--- a/pkg/transformers/put_or_filter.go
+++ b/pkg/transformers/put_or_filter.go
@@ -184,14 +184,14 @@ func transformerPutOrFilterParseCLI(
 	args []string,
 	mainOptions *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
 	verb := args[argi]
 	argi++
 
-	var dslStrings []string = make([]string, 0)
+	var dslStrings []string = []string{}
 	haveDSLStringsHere := false
 	echoDSLString := false
 	printASTAsTree := false
@@ -203,7 +203,7 @@ func transformerPutOrFilterParseCLI(
 	strictMode := false
 	invertFilter := false
 	suppressOutputRecord := false
-	presets := make([]string, 0)
+	presets := []string{}
 
 	// TODO: make sure this is a full nested-struct copy.
 	var options *cli.TOptions = nil
@@ -380,7 +380,7 @@ func transformerPutOrFilterParseCLI(
 		options,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -512,7 +512,7 @@ func (tr *TransformerPut) Transform(
 			tr.runtimeState.Update(nil, &context)
 			err := tr.cstRootNode.ExecuteBeginBlocks(tr.runtimeState)
 			if err != nil {
-				fmt.Fprintln(os.Stderr, err)
+				fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 				os.Exit(1)
 			}
 			tr.executedBeginBlocks = true
@@ -523,7 +523,7 @@ func (tr *TransformerPut) Transform(
 		// Execute the main block on the current input record
 		outrec, err := tr.cstRootNode.ExecuteMainBlock(tr.runtimeState)
 		if err != nil {
-			fmt.Fprintln(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 
@@ -573,7 +573,7 @@ func (tr *TransformerPut) Transform(
 		if !tr.executedBeginBlocks {
 			err := tr.cstRootNode.ExecuteBeginBlocks(tr.runtimeState)
 			if err != nil {
-				fmt.Fprintln(os.Stderr, err)
+				fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 				os.Exit(1)
 			}
 		}
@@ -581,7 +581,7 @@ func (tr *TransformerPut) Transform(
 		// Execute the end { ... } after the last input record
 		err := tr.cstRootNode.ExecuteEndBlocks(tr.runtimeState)
 		if err != nil {
-			fmt.Fprintln(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 
diff --git a/pkg/transformers/regularize.go b/pkg/transformers/regularize.go
index 5c7464c40..54342ac00 100644
--- a/pkg/transformers/regularize.go
+++ b/pkg/transformers/regularize.go
@@ -35,7 +35,7 @@ func transformerRegularizeParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -55,10 +55,9 @@ func transformerRegularizeParseCLI(
 			transformerRegularizeUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerRegularizeUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerRegularizeUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -68,7 +67,7 @@ func transformerRegularizeParseCLI(
 
 	transformer, err := NewTransformerRegularize()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -87,7 +86,6 @@ func NewTransformerRegularize() (*TransformerRegularize, error) {
 	return tr, nil
 }
 
-
 func (tr *TransformerRegularize) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/remove_empty_columns.go b/pkg/transformers/remove_empty_columns.go
index 8545818a6..ef7558b6d 100644
--- a/pkg/transformers/remove_empty_columns.go
+++ b/pkg/transformers/remove_empty_columns.go
@@ -34,7 +34,7 @@ func transformerRemoveEmptyColumnsParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -54,10 +54,9 @@ func transformerRemoveEmptyColumnsParseCLI(
 			transformerRemoveEmptyColumnsUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerRemoveEmptyColumnsUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerRemoveEmptyColumnsUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -67,7 +66,7 @@ func transformerRemoveEmptyColumnsParseCLI(
 
 	transformer, err := NewTransformerRemoveEmptyColumns()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -81,14 +80,12 @@ type TransformerRemoveEmptyColumns struct {
 
 func NewTransformerRemoveEmptyColumns() (*TransformerRemoveEmptyColumns, error) {
 	tr := &TransformerRemoveEmptyColumns{
-		recordsAndContexts:      make([]*types.RecordAndContext, 0),
+		recordsAndContexts:      []*types.RecordAndContext{},
 		namesWithNonEmptyValues: make(map[string]bool),
 	}
 	return tr, nil
 }
 
-// ---------------------------------------------------------------
-
 func (tr *TransformerRemoveEmptyColumns) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/rename.go b/pkg/transformers/rename.go
index 386ee7b2d..282f6e8fa 100644
--- a/pkg/transformers/rename.go
+++ b/pkg/transformers/rename.go
@@ -55,7 +55,7 @@ func transformerRenameParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -117,7 +117,7 @@ func transformerRenameParseCLI(
 		doGsub,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -161,7 +161,7 @@ func NewTransformerRename(
 		tr.doGsub = false
 		tr.recordTransformerFunc = tr.transformWithoutRegexes
 	} else {
-		tr.regexesAndReplacements = make([]*tRegexAndReplacement, 0)
+		tr.regexesAndReplacements = []*tRegexAndReplacement{}
 		for pe := oldToNewNames.Head; pe != nil; pe = pe.Next {
 			regexString := pe.Key
 			regex := lib.CompileMillerRegexOrDie(regexString)
@@ -181,7 +181,6 @@ func NewTransformerRename(
 	return tr, nil
 }
 
-
 func (tr *TransformerRename) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/reorder.go b/pkg/transformers/reorder.go
index eca31f958..1e8ce875d 100644
--- a/pkg/transformers/reorder.go
+++ b/pkg/transformers/reorder.go
@@ -56,7 +56,7 @@ func transformerReorderParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -125,7 +125,7 @@ func transformerReorderParseCLI(
 		centerFieldName,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/repeat.go b/pkg/transformers/repeat.go
index 6fe570ca6..5e5b5c751 100644
--- a/pkg/transformers/repeat.go
+++ b/pkg/transformers/repeat.go
@@ -63,7 +63,7 @@ func transformerRepeatParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	repeatCountSource := repeatCountSourceUnspecified
 	repeatCount := int64(0)
@@ -118,7 +118,7 @@ func transformerRepeatParseCLI(
 		repeatCountFieldName,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -151,7 +151,6 @@ func NewTransformerRepeat(
 	return tr, nil
 }
 
-
 func (tr *TransformerRepeat) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/reshape.go b/pkg/transformers/reshape.go
index 7c2d35f87..12a3986c1 100644
--- a/pkg/transformers/reshape.go
+++ b/pkg/transformers/reshape.go
@@ -1,6 +1,5 @@
 package transformers
 
-// ================================================================
 // WIDE:
 //          time           X          Y           Z
 // 1  2009-01-01  0.65473572  2.4520609 -1.46570942
@@ -121,7 +120,7 @@ func transformerReshapeParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -153,7 +152,7 @@ func transformerReshapeParseCLI(
 		} else if opt == "-r" {
 			inputFieldRegexString := cli.VerbGetStringArgOrDie(verb, opt, args, &argi, argc)
 			if inputFieldRegexStrings == nil {
-				inputFieldRegexStrings = make([]string, 0)
+				inputFieldRegexStrings = []string{}
 			}
 			inputFieldRegexStrings = append(inputFieldRegexStrings, inputFieldRegexString)
 		} else if opt == "-o" {
@@ -213,7 +212,7 @@ func transformerReshapeParseCLI(
 		splitOutValueFieldName,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -284,7 +283,6 @@ func NewTransformerReshape(
 	return tr, nil
 }
 
-
 func (tr *TransformerReshape) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/sample.go b/pkg/transformers/sample.go
index 6326e9b33..8f8c71683 100644
--- a/pkg/transformers/sample.go
+++ b/pkg/transformers/sample.go
@@ -39,7 +39,7 @@ func transformerSampleParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -90,7 +90,7 @@ func transformerSampleParseCLI(
 		groupByFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -121,7 +121,6 @@ func NewTransformerSample(
 	return tr, nil
 }
 
-
 func (tr *TransformerSample) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -165,7 +164,6 @@ func newSampleBucket(sampleCount int64) *sampleBucketType {
 	}
 }
 
-// ----------------------------------------------------------------
 // This is the reservoir-sampling algorithm.  Here we retain an input record
 // (if retained in the sample) or let it be GC'ed (if not retained in the
 // sample).
diff --git a/pkg/transformers/sec2gmt.go b/pkg/transformers/sec2gmt.go
index 8bdef34fe..33b64b978 100644
--- a/pkg/transformers/sec2gmt.go
+++ b/pkg/transformers/sec2gmt.go
@@ -43,7 +43,7 @@ func transformerSec2GMTParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -116,7 +116,7 @@ func transformerSec2GMTParseCLI(
 		numDecimalPlaces,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -142,7 +142,6 @@ func NewTransformerSec2GMT(
 	return tr, nil
 }
 
-
 func (tr *TransformerSec2GMT) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/sec2gmtdate.go b/pkg/transformers/sec2gmtdate.go
index 5dd6cc06f..5bad990b3 100644
--- a/pkg/transformers/sec2gmtdate.go
+++ b/pkg/transformers/sec2gmtdate.go
@@ -37,7 +37,7 @@ func transformerSec2GMTDateParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -57,10 +57,9 @@ func transformerSec2GMTDateParseCLI(
 			transformerSec2GMTDateUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerSec2GMTDateUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerSec2GMTDateUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	if argi >= argc {
@@ -79,7 +78,7 @@ func transformerSec2GMTDateParseCLI(
 		fieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -99,7 +98,6 @@ func NewTransformerSec2GMTDate(
 	return tr, nil
 }
 
-
 func (tr *TransformerSec2GMTDate) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/seqgen.go b/pkg/transformers/seqgen.go
index 057191758..d183ad057 100644
--- a/pkg/transformers/seqgen.go
+++ b/pkg/transformers/seqgen.go
@@ -46,7 +46,7 @@ func transformerSeqgenParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -102,7 +102,7 @@ func transformerSeqgenParseCLI(
 		stepString,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/shuffle.go b/pkg/transformers/shuffle.go
index 11017de82..b7874cd02 100644
--- a/pkg/transformers/shuffle.go
+++ b/pkg/transformers/shuffle.go
@@ -37,7 +37,7 @@ func transformerShuffleParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -57,10 +57,9 @@ func transformerShuffleParseCLI(
 			transformerShuffleUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerShuffleUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerShuffleUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -70,7 +69,7 @@ func transformerShuffleParseCLI(
 
 	transformer, err := NewTransformerShuffle()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -84,13 +83,12 @@ type TransformerShuffle struct {
 func NewTransformerShuffle() (*TransformerShuffle, error) {
 
 	tr := &TransformerShuffle{
-		recordsAndContexts: make([]*types.RecordAndContext, 0),
+		recordsAndContexts: []*types.RecordAndContext{},
 	}
 
 	return tr, nil
 }
 
-
 func (tr *TransformerShuffle) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/skip_trivial_records.go b/pkg/transformers/skip_trivial_records.go
index df1d8645e..3cb5b131c 100644
--- a/pkg/transformers/skip_trivial_records.go
+++ b/pkg/transformers/skip_trivial_records.go
@@ -34,7 +34,7 @@ func transformerSkipTrivialRecordsParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -54,10 +54,9 @@ func transformerSkipTrivialRecordsParseCLI(
 			transformerSkipTrivialRecordsUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerSkipTrivialRecordsUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerSkipTrivialRecordsUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -67,7 +66,7 @@ func transformerSkipTrivialRecordsParseCLI(
 
 	transformer, err := NewTransformerSkipTrivialRecords()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -82,7 +81,6 @@ func NewTransformerSkipTrivialRecords() (*TransformerSkipTrivialRecords, error)
 	return tr, nil
 }
 
-
 func (tr *TransformerSkipTrivialRecords) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/sort.go b/pkg/transformers/sort.go
index 63e211cb8..b8d576838 100644
--- a/pkg/transformers/sort.go
+++ b/pkg/transformers/sort.go
@@ -1,4 +1,3 @@
-// ================================================================
 // OVERVIEW
 //
 // * Suppose we are sorting records lexically ascending on field "a" and then
@@ -37,7 +36,6 @@
 // * Note in particular that string keys ["a":"red","x":"1"] and
 //   ["a":"red","x":"1.0"] map to different groups, but will sort equally.
 //
-// ================================================================
 
 package transformers
 
@@ -97,15 +95,15 @@ func transformerSortParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
 	verb := args[argi]
 	argi++
 
-	groupByFieldNames := make([]string, 0)
-	comparatorFuncs := make([]mlrval.CmpFuncInt, 0)
+	groupByFieldNames := []string{}
+	comparatorFuncs := []mlrval.CmpFuncInt{}
 	doMoveToHead := false
 
 	for argi < argc /* variable increment: 1 or 2 depending on flag */ {
@@ -280,14 +278,13 @@ func transformerSortParseCLI(
 		doMoveToHead,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
 	return transformer
 }
 
-// ----------------------------------------------------------------
 // Example:
 // * mlr sort -f a -n i
 // * group-by field-name list is "a,i"
@@ -331,7 +328,7 @@ func NewTransformerSort(
 
 		recordListsByGroup: lib.NewOrderedMap[*[]*types.RecordAndContext](),
 		groupHeads:         lib.NewOrderedMap[[]*mlrval.Mlrval](),
-		spillGroup:         make([]*types.RecordAndContext, 0),
+		spillGroup:         []*types.RecordAndContext{},
 	}
 
 	return tr, nil
@@ -369,7 +366,7 @@ func (tr *TransformerSort) Transform(
 
 		recordListForGroup := tr.recordListsByGroup.Get(groupingKey)
 		if recordListForGroup == nil {
-			records := make([]*types.RecordAndContext, 0)
+			records := []*types.RecordAndContext{}
 			recordListForGroup = &records
 			tr.recordListsByGroup.Put(groupingKey, recordListForGroup)
 			tr.groupHeads.Put(groupingKey, selectedValues)
diff --git a/pkg/transformers/sort_within_records.go b/pkg/transformers/sort_within_records.go
index 0f65b1653..696490ca9 100644
--- a/pkg/transformers/sort_within_records.go
+++ b/pkg/transformers/sort_within_records.go
@@ -34,7 +34,7 @@ func transformerSortWithinRecordsParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -74,7 +74,7 @@ func transformerSortWithinRecordsParseCLI(
 
 	transformer, err := NewTransformerSortWithinRecords(doRecurse)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/sparsify.go b/pkg/transformers/sparsify.go
index 57789b5f2..11ab18b81 100644
--- a/pkg/transformers/sparsify.go
+++ b/pkg/transformers/sparsify.go
@@ -46,7 +46,7 @@ func transformerSparsifyParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -92,7 +92,7 @@ func transformerSparsifyParseCLI(
 		specifiedFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/split.go b/pkg/transformers/split.go
index 89c07e231..5224782b3 100644
--- a/pkg/transformers/split.go
+++ b/pkg/transformers/split.go
@@ -80,7 +80,7 @@ func transformerSplitParseCLI(
 	args []string,
 	mainOptions *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
diff --git a/pkg/transformers/stats1.go b/pkg/transformers/stats1.go
index 7fecba680..fe4ba1d81 100644
--- a/pkg/transformers/stats1.go
+++ b/pkg/transformers/stats1.go
@@ -92,16 +92,16 @@ func transformerStats1ParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
 	verb := args[argi]
 	argi++
 
-	accumulatorNameList := make([]string, 0)
-	valueFieldNameList := make([]string, 0)
-	groupByFieldNameList := make([]string, 0)
+	accumulatorNameList := []string{}
+	valueFieldNameList := []string{}
+	groupByFieldNameList := []string{}
 
 	doRegexValueFieldNames := false
 	doRegexGroupByFieldNames := false
@@ -206,7 +206,7 @@ func transformerStats1ParseCLI(
 		doIterativeStats,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr stats1: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -309,7 +309,7 @@ func NewTransformerStats1(
 ) (*TransformerStats1, error) {
 	for _, name := range accumulatorNameList {
 		if !utils.ValidateStats1AccumulatorName(name) {
-			return nil, fmt.Errorf(`mlr stats1: accumulator "%s" not found`, name)
+			return nil, fmt.Errorf(`accumulator "%s" not found`, name)
 		}
 	}
 
diff --git a/pkg/transformers/stats2.go b/pkg/transformers/stats2.go
index 368a23ed9..6ed329b35 100644
--- a/pkg/transformers/stats2.go
+++ b/pkg/transformers/stats2.go
@@ -62,7 +62,7 @@ func transformerStats2ParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -73,7 +73,7 @@ func transformerStats2ParseCLI(
 
 	var accumulatorNameList []string = nil
 	var valueFieldNameList []string = nil
-	groupByFieldNameList := make([]string, 0)
+	groupByFieldNameList := []string{}
 	doVerbose := false
 	doIterativeStats := false
 	doHoldAndFit := false
@@ -159,7 +159,7 @@ func transformerStats2ParseCLI(
 		doHoldAndFit,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -222,7 +222,6 @@ func NewTransformerStats2(
 	return tr, nil
 }
 
-// ================================================================
 // Given: accumulate corr,cov on values x,y group by a,b.
 // Example input:       Example output:
 //   a b x y            a b x_corr x_cov y_corr y_cov
@@ -255,8 +254,6 @@ func NewTransformerStats2(
 //
 // In the iterative case, add to the current record its current group's stats fields.
 // In the non-iterative case, produce output only at the end of the input stream.
-// ================================================================
-
 
 func (tr *TransformerStats2) Transform(
 	inrecAndContext *types.RecordAndContext,
@@ -310,7 +307,7 @@ func (tr *TransformerStats2) ingest(
 	if tr.doHoldAndFit { // Retain the input record in memory, for fitting and delivery at end of stream
 		groupToRecords := tr.recordGroups.Get(groupingKey)
 		if groupToRecords == nil {
-			records := make([]*types.RecordAndContext, 0)
+			records := []*types.RecordAndContext{}
 			groupToRecords = &records
 			tr.recordGroups.Put(groupingKey, groupToRecords)
 		}
diff --git a/pkg/transformers/step.go b/pkg/transformers/step.go
index 4c63e8b47..2b64c4940 100644
--- a/pkg/transformers/step.go
+++ b/pkg/transformers/step.go
@@ -1,4 +1,3 @@
-// ================================================================
 // Options for the step verb are mostly simple operations involving the previous record and the
 // current record, optionally grouped by one or more group-by field names. For example, with input
 // data
@@ -63,7 +62,6 @@
 //   window object for their grouping key.  We don't know a priori when the end of the record stream
 //   is so we keep the last n records for each grouping key.  At end of the record stream we process
 //   these.
-// ================================================================
 
 package transformers
 
@@ -145,7 +143,7 @@ func transformerStepParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -225,14 +223,13 @@ func transformerStepParseCLI(
 		ewmaSuffixes,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
 	return transformer
 }
 
-// ----------------------------------------------------------------
 // This is the "stepper log" referred to in comments at the top of this file.
 type tStepLogEntry struct {
 	recordAndContext *types.RecordAndContext
@@ -316,7 +313,6 @@ func NewTransformerStep(
 	return tr, nil
 }
 
-// ----------------------------------------------------------------
 // Multilevel hashmap structure for the `groups` field example:
 //
 // * Group-by field names = ["a", "b"]
@@ -533,7 +529,6 @@ func (tr *TransformerStep) makeLogKey(
 	return fmt.Sprintf("%p", inrecAndContext)
 }
 
-// ================================================================
 // Lookups for individual steppers, like "delta" or "rsum"
 
 type tStepperInputFromName func(
@@ -689,7 +684,6 @@ func allocateStepper(
 	return nil
 }
 
-// ================================================================
 // Implementations of individual steppers, like "delta" or "rsum"
 
 type tStepperDelta struct {
@@ -748,7 +742,6 @@ func (stepper *tStepperDelta) process(
 	currec.PutCopy(stepper.outputFieldName, delta.Copy())
 }
 
-// ================================================================
 // shift is an alias for shift
 type tStepperShiftLag struct {
 	inputFieldName  string
@@ -1123,7 +1116,6 @@ func (stepper *tStepperCounter) process(
 	}
 }
 
-// ================================================================
 // https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
 
 type tStepperEWMA struct {
diff --git a/pkg/transformers/subs.go b/pkg/transformers/subs.go
index f39c703a6..849c0cb46 100644
--- a/pkg/transformers/subs.go
+++ b/pkg/transformers/subs.go
@@ -85,7 +85,7 @@ type subConstructorFunc func(
 	doRegexes bool,
 	oldText string,
 	newText string,
-) (IRecordTransformer, error)
+) (RecordTransformer, error)
 
 type fieldAcceptorFunc func(
 	fieldName string,
@@ -97,7 +97,7 @@ func transformerSubParseCLI(
 	args []string,
 	opts *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 	return transformerSubsParseCLI(pargi, argc, args, opts, doConstruct, transformerSubUsage, NewTransformerSub)
 }
 
@@ -107,7 +107,7 @@ func transformerGsubParseCLI(
 	args []string,
 	opts *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 	return transformerSubsParseCLI(pargi, argc, args, opts, doConstruct, transformerGsubUsage, NewTransformerGsub)
 }
 
@@ -117,7 +117,7 @@ func transformerSsubParseCLI(
 	args []string,
 	opts *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 	return transformerSubsParseCLI(pargi, argc, args, opts, doConstruct, transformerSsubUsage, NewTransformerSsub)
 }
 
@@ -130,7 +130,7 @@ func transformerSubsParseCLI(
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
 	usageFunc TransformerUsageFunc,
 	constructorFunc subConstructorFunc,
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -203,7 +203,7 @@ func transformerSubsParseCLI(
 		newText,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -225,7 +225,7 @@ func NewTransformerSub(
 	doRegexes bool,
 	oldText string,
 	newText string,
-) (IRecordTransformer, error) {
+) (RecordTransformer, error) {
 	return NewTransformerSubs(fieldNames, doAllFieldNames, doRegexes, oldText, newText, safe_sub)
 }
 
@@ -235,7 +235,7 @@ func NewTransformerGsub(
 	doRegexes bool,
 	oldText string,
 	newText string,
-) (IRecordTransformer, error) {
+) (RecordTransformer, error) {
 	return NewTransformerSubs(fieldNames, doAllFieldNames, doRegexes, oldText, newText, safe_gsub)
 }
 
@@ -245,7 +245,7 @@ func NewTransformerSsub(
 	doRegexes bool,
 	oldText string,
 	newText string,
-) (IRecordTransformer, error) {
+) (RecordTransformer, error) {
 	return NewTransformerSubs(fieldNames, doAllFieldNames, doRegexes, oldText, newText, safe_ssub)
 }
 
@@ -256,7 +256,7 @@ func NewTransformerSubs(
 	oldText string,
 	newText string,
 	subber bifs.TernaryFunc,
-) (IRecordTransformer, error) {
+) (RecordTransformer, error) {
 	tr := &TransformerSubs{
 		fieldNamesSet: lib.StringListToSet(fieldNames),
 		oldText:       mlrval.FromString(oldText),
@@ -335,25 +335,22 @@ func (tr *TransformerSubs) fieldAcceptorAll(
 func safe_sub(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsString() {
 		return bifs.BIF_sub(input1, input2, input3)
-	} else {
-		return input1
 	}
+	return input1
 }
 
 // safe_gsub implements gsub, but doesn't produce error-type on non-string input.
 func safe_gsub(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsString() {
 		return bifs.BIF_gsub(input1, input2, input3)
-	} else {
-		return input1
 	}
+	return input1
 }
 
 // safe_ssub implements ssub, but doesn't produce error-type on non-string input.
 func safe_ssub(input1, input2, input3 *mlrval.Mlrval) *mlrval.Mlrval {
 	if input1.IsString() {
 		return bifs.BIF_ssub(input1, input2, input3)
-	} else {
-		return input1
 	}
+	return input1
 }
diff --git a/pkg/transformers/summary.go b/pkg/transformers/summary.go
index ccdd18b38..01cd6d2f0 100644
--- a/pkg/transformers/summary.go
+++ b/pkg/transformers/summary.go
@@ -114,7 +114,7 @@ func transformerSummaryParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -179,7 +179,7 @@ func transformerSummaryParseCLI(
 				excludeSummarizerNamesSet[excludeSummarizerName] = true
 			}
 
-			summarizerNames = make([]string, 0)
+			summarizerNames = []string{}
 			for _, summarizerName := range allSummarizerNamesList {
 				if !excludeSummarizerNamesSet[summarizerName] {
 					summarizerNames = append(summarizerNames, summarizerName)
@@ -202,7 +202,7 @@ func transformerSummaryParseCLI(
 
 	transformer, err := NewTransformerSummary(summarizerNames, transposeOutput)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -285,7 +285,6 @@ func NewTransformerSummary(
 	return tr, nil
 }
 
-
 func (tr *TransformerSummary) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -417,8 +416,6 @@ func (tr *TransformerSummary) emitTransposed(
 	*oracs = append(*oracs, inrecAndContext) // end-of-stream marker
 }
 
-// ----------------------------------------------------------------
-
 // maybeEmitAccumulatorTransposed is a helper method for emitTransposed,
 // for "count", "sum", "mean", etc.
 func (tr *TransformerSummary) maybeEmitAccumulatorTransposed(
diff --git a/pkg/transformers/surv.go b/pkg/transformers/surv.go
index 541debfce..ae7c9a12a 100644
--- a/pkg/transformers/surv.go
+++ b/pkg/transformers/surv.go
@@ -39,7 +39,7 @@ func transformerSurvParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool,
-) IRecordTransformer {
+) RecordTransformer {
 	argi := *pargi
 	verb := args[argi]
 	argi++
@@ -100,12 +100,12 @@ type TransformerSurv struct {
 }
 
 // NewTransformerSurv constructs a new surv transformer.
-func NewTransformerSurv(durationField, statusField string) IRecordTransformer {
+func NewTransformerSurv(durationField, statusField string) RecordTransformer {
 	return &TransformerSurv{
 		durationField: durationField,
 		statusField:   statusField,
-		times:         make([]float64, 0),
-		events:        make([]bool, 0),
+		times:         []float64{},
+		events:        []bool{},
 	}
 }
 
diff --git a/pkg/transformers/tac.go b/pkg/transformers/tac.go
index 36f55e703..b166ed56b 100644
--- a/pkg/transformers/tac.go
+++ b/pkg/transformers/tac.go
@@ -33,7 +33,7 @@ func transformerTacParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -53,10 +53,9 @@ func transformerTacParseCLI(
 			transformerTacUsage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerTacUsage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerTacUsage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -66,7 +65,7 @@ func transformerTacParseCLI(
 
 	transformer, err := NewTransformerTac()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -79,7 +78,7 @@ type TransformerTac struct {
 
 func NewTransformerTac() (*TransformerTac, error) {
 	return &TransformerTac{
-		recordsAndContexts: make([]*types.RecordAndContext, 0),
+		recordsAndContexts: []*types.RecordAndContext{},
 	}, nil
 }
 
diff --git a/pkg/transformers/tail.go b/pkg/transformers/tail.go
index 108fa5d7c..c35048ff7 100644
--- a/pkg/transformers/tail.go
+++ b/pkg/transformers/tail.go
@@ -37,7 +37,7 @@ func transformerTailParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -93,7 +93,7 @@ func transformerTailParseCLI(
 		groupByFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -125,7 +125,6 @@ func NewTransformerTail(
 	return tr, nil
 }
 
-
 func (tr *TransformerTail) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -143,7 +142,7 @@ func (tr *TransformerTail) Transform(
 
 		recordListForGroup := tr.recordListsByGroup.Get(groupingKey)
 		if recordListForGroup == nil { // first time
-			records := make([]*types.RecordAndContext, 0)
+			records := []*types.RecordAndContext{}
 			recordListForGroup = &records
 			tr.recordListsByGroup.Put(groupingKey, recordListForGroup)
 		}
diff --git a/pkg/transformers/tee.go b/pkg/transformers/tee.go
index f915e3513..eb794e39c 100644
--- a/pkg/transformers/tee.go
+++ b/pkg/transformers/tee.go
@@ -42,7 +42,7 @@ func transformerTeeParseCLI(
 	args []string,
 	mainOptions *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -139,7 +139,7 @@ func NewTransformerTee(
 	recordWriterOptions *cli.TWriterOptions,
 ) (*TransformerTee, error) {
 	var fileOutputHandler *output.FileOutputHandler = nil
-	var err error = nil
+	var err error
 	filenameOrCommandForDisplay := filenameOrCommand
 	if piping {
 		fileOutputHandler, err = output.NewPipeWriteOutputHandler(filenameOrCommand, recordWriterOptions)
@@ -195,7 +195,7 @@ func (tr *TransformerTee) Transform(
 				"%s: error writing to tee \"%s\":\n",
 				"mlr", tr.filenameOrCommandForDisplay,
 			)
-			fmt.Fprintln(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 
@@ -208,7 +208,7 @@ func (tr *TransformerTee) Transform(
 				"%s: error closing tee \"%s\":\n",
 				"mlr", tr.filenameOrCommandForDisplay,
 			)
-			fmt.Fprintln(os.Stderr, err)
+			fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 			os.Exit(1)
 		}
 		*outputRecordsAndContexts = append(*outputRecordsAndContexts, inrecAndContext)
diff --git a/pkg/transformers/template.go b/pkg/transformers/template.go
index 398699e22..2ccbad3bf 100644
--- a/pkg/transformers/template.go
+++ b/pkg/transformers/template.go
@@ -44,7 +44,7 @@ func transformerTemplateParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -104,7 +104,7 @@ func transformerTemplateParseCLI(
 		fillWith,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -128,7 +128,6 @@ func NewTransformerTemplate(
 	}, nil
 }
 
-
 func (tr *TransformerTemplate) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/top.go b/pkg/transformers/top.go
index 6a3e7d346..cf43c197a 100644
--- a/pkg/transformers/top.go
+++ b/pkg/transformers/top.go
@@ -52,7 +52,7 @@ func transformerTopParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
diff --git a/pkg/transformers/unflatten.go b/pkg/transformers/unflatten.go
index e36d5f2fe..6aad5a225 100644
--- a/pkg/transformers/unflatten.go
+++ b/pkg/transformers/unflatten.go
@@ -39,7 +39,7 @@ func transformerUnflattenParseCLI(
 	args []string,
 	options *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -86,7 +86,7 @@ func transformerUnflattenParseCLI(
 		fieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -126,7 +126,6 @@ func NewTransformerUnflatten(
 	return retval, nil
 }
 
-
 func (tr *TransformerUnflatten) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/uniq.go b/pkg/transformers/uniq.go
index 7a0e87a79..ad368f81b 100644
--- a/pkg/transformers/uniq.go
+++ b/pkg/transformers/uniq.go
@@ -57,7 +57,7 @@ func transformerCountDistinctParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -134,7 +134,7 @@ func transformerCountDistinctParseCLI(
 		uniqifyEntireRecords,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -168,7 +168,7 @@ func transformerUniqParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -347,15 +347,13 @@ func NewTransformerUniq(
 	return tr, nil
 }
 
-
 func (tr *TransformerUniq) getFieldNamesForGrouping(
 	inrec *mlrval.Mlrmap,
 ) []string {
 	if tr.invertFieldNames {
 		return inrec.GetKeysExcept(tr.fieldNamesSet)
-	} else {
-		return tr.fieldNames
 	}
+	return tr.fieldNames
 }
 
 func (tr *TransformerUniq) Transform(
@@ -368,7 +366,6 @@ func (tr *TransformerUniq) Transform(
 	tr.recordTransformerFunc(inrecAndContext, outputRecordsAndContexts, inputDownstreamDoneChannel, outputDownstreamDoneChannel)
 }
 
-// ----------------------------------------------------------------
 // Print each unique record only once, with uniqueness counts.  This means
 // non-streaming, with output at end of stream.
 func (tr *TransformerUniq) transformUniqifyEntireRecordsShowCounts(
@@ -404,7 +401,6 @@ func (tr *TransformerUniq) transformUniqifyEntireRecordsShowCounts(
 
 }
 
-// ----------------------------------------------------------------
 // Print count of unique records.  This means non-streaming, with output at end
 // of stream.
 func (tr *TransformerUniq) transformUniqifyEntireRecordsShowNumDistinctOnly(
@@ -432,7 +428,6 @@ func (tr *TransformerUniq) transformUniqifyEntireRecordsShowNumDistinctOnly(
 	}
 }
 
-// ----------------------------------------------------------------
 // Print each unique record only once (on first occurrence).
 func (tr *TransformerUniq) transformUniqifyEntireRecords(
 	inrecAndContext *types.RecordAndContext,
diff --git a/pkg/transformers/unspace.go b/pkg/transformers/unspace.go
index 7f096b188..c3bf8bf0c 100644
--- a/pkg/transformers/unspace.go
+++ b/pkg/transformers/unspace.go
@@ -37,7 +37,7 @@ func transformerUnspaceParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -83,7 +83,7 @@ func transformerUnspaceParseCLI(
 
 	transformer, err := NewTransformerUnspace(filler, which)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
diff --git a/pkg/transformers/unsparsify.go b/pkg/transformers/unsparsify.go
index fd377b414..d558a819d 100644
--- a/pkg/transformers/unsparsify.go
+++ b/pkg/transformers/unsparsify.go
@@ -50,7 +50,7 @@ func transformerUnsparsifyParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -96,7 +96,7 @@ func transformerUnsparsifyParseCLI(
 		specifiedFieldNames,
 	)
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -122,7 +122,7 @@ func NewTransformerUnsparsify(
 
 	tr := &TransformerUnsparsify{
 		fillerMlrval:       mlrval.FromString(fillerString),
-		recordsAndContexts: make([]*types.RecordAndContext, 0),
+		recordsAndContexts: []*types.RecordAndContext{},
 		fieldNamesSeen:     fieldNamesSeen,
 	}
 
@@ -135,7 +135,6 @@ func NewTransformerUnsparsify(
 	return tr, nil
 }
 
-
 func (tr *TransformerUnsparsify) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/utf8_to_latin1.go b/pkg/transformers/utf8_to_latin1.go
index 2782efedc..e57db15f7 100644
--- a/pkg/transformers/utf8_to_latin1.go
+++ b/pkg/transformers/utf8_to_latin1.go
@@ -36,7 +36,7 @@ func transformerUTF8ToLatin1ParseCLI(
 	args []string,
 	_ *cli.TOptions,
 	doConstruct bool, // false for first pass of CLI-parse, true for second pass
-) IRecordTransformer {
+) RecordTransformer {
 
 	// Skip the verb name from the current spot in the mlr command line
 	argi := *pargi
@@ -56,10 +56,9 @@ func transformerUTF8ToLatin1ParseCLI(
 			transformerUTF8ToLatin1Usage(os.Stdout)
 			os.Exit(0)
 
-		} else {
-			transformerUTF8ToLatin1Usage(os.Stderr)
-			os.Exit(1)
 		}
+		transformerUTF8ToLatin1Usage(os.Stderr)
+		os.Exit(1)
 	}
 
 	*pargi = argi
@@ -69,7 +68,7 @@ func transformerUTF8ToLatin1ParseCLI(
 
 	transformer, err := NewTransformerUTF8ToLatin1()
 	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -84,7 +83,6 @@ func NewTransformerUTF8ToLatin1() (*TransformerUTF8ToLatin1, error) {
 	return tr, nil
 }
 
-
 func (tr *TransformerUTF8ToLatin1) Transform(
 	inrecAndContext *types.RecordAndContext,
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
diff --git a/pkg/transformers/utils/join_bucket.go b/pkg/transformers/utils/join_bucket.go
index fad612dd3..5d46b39ca 100644
--- a/pkg/transformers/utils/join_bucket.go
+++ b/pkg/transformers/utils/join_bucket.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Helper data structure for the join verb
-// ================================================================
 
 package utils
 
@@ -20,7 +18,7 @@ func NewJoinBucket(
 ) *JoinBucket {
 	return &JoinBucket{
 		leftFieldValues:    leftFieldValues,
-		RecordsAndContexts: make([]*types.RecordAndContext, 0),
+		RecordsAndContexts: []*types.RecordAndContext{},
 		WasPaired:          false,
 	}
 }
diff --git a/pkg/transformers/utils/join_bucket_keeper.go b/pkg/transformers/utils/join_bucket_keeper.go
index 59e8b2dd7..d877d28f7 100644
--- a/pkg/transformers/utils/join_bucket_keeper.go
+++ b/pkg/transformers/utils/join_bucket_keeper.go
@@ -1,4 +1,3 @@
-// ================================================================
 // JOIN_BUCKET_KEEPER
 //
 // This data structure supports Miller's sorted (double-streaming) join.  It is
@@ -40,7 +39,6 @@
 // * the right record with R=f is unpaired, and
 // * the left records with L=c and L=d are unpaired.
 //
-// ----------------------------------------------------------------
 // Now for the sorted (doubly-streaming) case. Here we require that the left
 // and right files be already sorted (lexically ascending) by the join fields.
 // Then the example inputs look like this:
@@ -103,7 +101,6 @@
 // * right record has R==f; left records with L==e are unpaired.
 // * etc.
 //
-// ================================================================
 
 package utils
 
@@ -119,7 +116,6 @@ import (
 	"github.com/johnkerl/miller/v6/pkg/types"
 )
 
-// ----------------------------------------------------------------
 // Data stored in this class
 type JoinBucketKeeper struct {
 	// For streaming through the left-side file
@@ -168,7 +164,7 @@ func NewJoinBucketKeeper(
 	// Instantiate the record-reader
 	recordReader, err := input.Create(joinReaderOptions, 1) // TODO: maybe increase records per batch
 	if err != nil {
-		fmt.Fprintf(os.Stderr, "mlr join: %v", err)
+		fmt.Fprintf(os.Stderr, "mlr join: %v\n", err)
 		os.Exit(1)
 	}
 
@@ -199,7 +195,7 @@ func NewJoinBucketKeeper(
 
 		JoinBucket:           NewJoinBucket(nil),
 		peekRecordAndContext: nil,
-		leftUnpaireds:        make([]*types.RecordAndContext, 0),
+		leftUnpaireds:        []*types.RecordAndContext{},
 
 		leof:  false,
 		state: LEFT_STATE_0_PREFILL,
@@ -208,7 +204,6 @@ func NewJoinBucketKeeper(
 	return keeper
 }
 
-// ----------------------------------------------------------------
 // For JoinBucketKeeper state machine
 type tJoinBucketKeeperState int
 
@@ -227,19 +222,16 @@ func (keeper *JoinBucketKeeper) computeState() tJoinBucketKeeperState {
 	if keeper.JoinBucket.leftFieldValues == nil {
 		if !keeper.leof {
 			return LEFT_STATE_0_PREFILL
-		} else {
-			return LEFT_STATE_3_EOF
 		}
+		return LEFT_STATE_3_EOF
+	}
+	if keeper.peekRecordAndContext == nil {
+		return LEFT_STATE_2_LAST_BUCKET
 	} else {
-		if keeper.peekRecordAndContext == nil {
-			return LEFT_STATE_2_LAST_BUCKET
-		} else {
-			return LEFT_STATE_1_FULL
-		}
+		return LEFT_STATE_1_FULL
 	}
 }
 
-// ----------------------------------------------------------------
 // This is the main entry point for the join verb.  Given the right-field
 // values from the current right-file record, this method finds left-file
 // join-bucket (if any) and points keeper.JoinBucket at it.
@@ -326,7 +318,6 @@ func (keeper *JoinBucketKeeper) FindJoinBucket(
 	return isPaired
 }
 
-// ----------------------------------------------------------------
 // This finds the first peek record which possesses all the necessary join-field
 // keys.  Any other records found along the way, lacking the necessary
 // join-field keys, are moved to the left-unpaired list.
@@ -351,7 +342,6 @@ func (keeper *JoinBucketKeeper) prepareForFirstJoinBucket() {
 	}
 }
 
-// ----------------------------------------------------------------
 // After right-file input has moved past the current join-bucket, this finds
 // the next peek record which possesses all the necessary join-field keys.  Any
 // other records found along the way, lacking the necessary join-field keys,
@@ -437,7 +427,6 @@ func (keeper *JoinBucketKeeper) prepareForNewJoinBucket(
 	}
 }
 
-// ----------------------------------------------------------------
 // This takes the peek record and forms a complete join-bucket with all records
 // having its join-field values. E.g. if the join-field is "id" and the peek
 // record has id=5, it's moved to a new join bucket with id=5 and all other
@@ -503,7 +492,6 @@ func (keeper *JoinBucketKeeper) fillNextJoinBucket() {
 	}
 }
 
-// ----------------------------------------------------------------
 // TODO: comment
 func (keeper *JoinBucketKeeper) markRemainingsAsUnpaired() {
 	// 1. Any records already in keeper.JoinBucket.records (current bucket)
@@ -528,7 +516,6 @@ func (keeper *JoinBucketKeeper) markRemainingsAsUnpaired() {
 	}
 }
 
-// ----------------------------------------------------------------
 // TODO: comment
 func (keeper *JoinBucketKeeper) OutputAndReleaseLeftUnpaireds(
 	outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
@@ -546,10 +533,8 @@ func (keeper *JoinBucketKeeper) ReleaseLeftUnpaireds(
 	keeper.leftUnpaireds = keeper.leftUnpaireds[:0]
 }
 
-// ================================================================
 // HELPER FUNCTIONS
 
-// ----------------------------------------------------------------
 // Method to get the next left-file record from the record-reader goroutine.
 // Returns nil at EOF.
 
@@ -560,7 +545,7 @@ func (keeper *JoinBucketKeeper) readRecord() *types.RecordAndContext {
 
 	select {
 	case err := <-keeper.errorChannel:
-		fmt.Fprintln(os.Stderr, "mlr", ": ", err)
+		fmt.Fprintf(os.Stderr, "mlr: %v\n", err)
 		os.Exit(1)
 	case leftrecsAndContexts := <-keeper.readerChannel:
 		// TODO: temp
@@ -570,15 +555,13 @@ func (keeper *JoinBucketKeeper) readRecord() *types.RecordAndContext {
 		if leftrecAndContext.EndOfStream { // end-of-stream marker
 			keeper.recordReaderDone = true
 			return nil
-		} else {
-			return leftrecAndContext
 		}
+		return leftrecAndContext
 	}
 
 	return nil
 }
 
-// ----------------------------------------------------------------
 // Pops everything off second-argument list and push to first-argument list.
 
 func moveRecordsAndContexts(
@@ -589,7 +572,6 @@ func moveRecordsAndContexts(
 	*source = (*source)[:0]
 }
 
-// ----------------------------------------------------------------
 // Returns -1, 0, 1 as left <, ==, > right, using lexical comparison only (even
 // for numerical values).
 
@@ -621,15 +603,14 @@ func KeepLeftFieldNames(
 	} else if leftKeepFieldNameSet == nil {
 		// Normal case
 		return inrec
-	} else {
-		outrec := mlrval.NewMlrmap()
-		for pe := inrec.Head; pe != nil; pe = pe.Next {
-			if leftKeepFieldNameSet[pe.Key] {
-				// PutReference, not PutCopy, since the inrec will be freed and this
-				// is an ownership transfer.
-				outrec.PutReference(pe.Key, pe.Value)
-			}
-		}
-		return outrec
 	}
+	outrec := mlrval.NewMlrmap()
+	for pe := inrec.Head; pe != nil; pe = pe.Next {
+		if leftKeepFieldNameSet[pe.Key] {
+			// PutReference, not PutCopy, since the inrec will be freed and this
+			// is an ownership transfer.
+			outrec.PutReference(pe.Key, pe.Value)
+		}
+	}
+	return outrec
 }
diff --git a/pkg/transformers/utils/percentile_keeper.go b/pkg/transformers/utils/percentile_keeper.go
index 85cdc7fb3..447187590 100644
--- a/pkg/transformers/utils/percentile_keeper.go
+++ b/pkg/transformers/utils/percentile_keeper.go
@@ -1,6 +1,4 @@
-// ================================================================
 // TODO: comment here
-// ================================================================
 
 package utils
 
@@ -64,9 +62,8 @@ func (keeper *PercentileKeeper) sortIfNecessary() {
 func (keeper *PercentileKeeper) Emit(percentile float64) *mlrval.Mlrval {
 	if keeper.doInterpolatedPercentiles {
 		return keeper.EmitLinearlyInterpolated(percentile)
-	} else {
-		return keeper.EmitNonInterpolated(percentile)
 	}
+	return keeper.EmitNonInterpolated(percentile)
 }
 
 func (keeper *PercentileKeeper) EmitNonInterpolated(percentile float64) *mlrval.Mlrval {
@@ -85,7 +82,6 @@ func (keeper *PercentileKeeper) EmitLinearlyInterpolated(percentile float64) *ml
 	return bifs.GetPercentileLinearlyInterpolated(keeper.data, int(len(keeper.data)), percentile)
 }
 
-// ----------------------------------------------------------------
 // TODO: COMMENT
 func (keeper *PercentileKeeper) EmitNamed(name string) *mlrval.Mlrval {
 	if name == "min" {
@@ -104,49 +100,43 @@ func (keeper *PercentileKeeper) EmitNamed(name string) *mlrval.Mlrval {
 		p75 := keeper.EmitNonInterpolated(75.0)
 		if p25.IsNumeric() && p75.IsNumeric() {
 			return bifs.BIF_minus_binary(p75, p25)
-		} else {
-			return mlrval.VOID
 		}
+		return mlrval.VOID
 
 	} else if name == "lof" {
 		p25 := keeper.EmitNonInterpolated(25.0)
 		iqr := keeper.EmitNamed("iqr")
 		if p25.IsNumeric() && iqr.IsNumeric() {
 			return bifs.BIF_minus_binary(p25, bifs.BIF_times(fenceOuterK, iqr))
-		} else {
-			return mlrval.VOID
 		}
+		return mlrval.VOID
 
 	} else if name == "lif" {
 		p25 := keeper.EmitNonInterpolated(25.0)
 		iqr := keeper.EmitNamed("iqr")
 		if p25.IsNumeric() && iqr.IsNumeric() {
 			return bifs.BIF_minus_binary(p25, bifs.BIF_times(fenceInnerK, iqr))
-		} else {
-			return mlrval.VOID
 		}
+		return mlrval.VOID
 
 	} else if name == "uif" {
 		p75 := keeper.EmitNonInterpolated(75.0)
 		iqr := keeper.EmitNamed("iqr")
 		if p75.IsNumeric() && iqr.IsNumeric() {
 			return bifs.BIF_plus_binary(p75, bifs.BIF_times(fenceInnerK, iqr))
-		} else {
-			return mlrval.VOID
 		}
+		return mlrval.VOID
 
 	} else if name == "uof" {
 		p75 := keeper.EmitNonInterpolated(75.0)
 		iqr := keeper.EmitNamed("iqr")
 		if p75.IsNumeric() && iqr.IsNumeric() {
 			return bifs.BIF_plus_binary(p75, bifs.BIF_times(fenceOuterK, iqr))
-		} else {
-			return mlrval.VOID
 		}
+		return mlrval.VOID
 
-	} else {
-		return mlrval.FromError(
-			fmt.Errorf(`stats1: unrecognized percentilename "%s"`, name),
-		)
 	}
+	return mlrval.FromError(
+		fmt.Errorf(`stats1: unrecognized percentilename "%s"`, name),
+	)
 }
diff --git a/pkg/transformers/utils/stats1_accumulators.go b/pkg/transformers/utils/stats1_accumulators.go
index 42b9c2bdc..35f62cdae 100644
--- a/pkg/transformers/utils/stats1_accumulators.go
+++ b/pkg/transformers/utils/stats1_accumulators.go
@@ -1,6 +1,4 @@
-// ================================================================
 // For stats1 as well as merge-fields
-// ================================================================
 
 package utils
 
@@ -125,7 +123,6 @@ var stats1AccumulatorInfos []stats1AccumulatorInfo = []stats1AccumulatorInfo{
 	},
 }
 
-// ================================================================
 // TODO: comment
 
 type Stats1NamedAccumulator struct {
@@ -160,7 +157,6 @@ func (nacc *Stats1NamedAccumulator) Reset() {
 	nacc.accumulator.Reset()
 }
 
-// ----------------------------------------------------------------
 // If we are asked for p90 and p95 on the same column, we reuse the
 // percentile-keeper object to reduce runtime memory consumption.  This
 // two-level map is keyed by value-field name and grouping key.  E.g. for 'mlr
@@ -225,20 +221,19 @@ func tryPercentileFromName(accumulatorName string) (float64, bool) {
 	return 0.0, false
 }
 
-// ----------------------------------------------------------------
 // For merge-fields wherein percentile-keepers are re-created on each record
-func (factory *Stats1AccumulatorFactory) Reset() {
-	factory.percentileKeepers = make(map[string]map[string]*PercentileKeeper)
+func (fac *Stats1AccumulatorFactory) Reset() {
+	fac.percentileKeepers = make(map[string]map[string]*PercentileKeeper)
 }
 
-func (factory *Stats1AccumulatorFactory) MakeNamedAccumulator(
+func (fac *Stats1AccumulatorFactory) MakeNamedAccumulator(
 	accumulatorName string,
 	groupingKey string,
 	valueFieldName string,
 	doInterpolatedPercentiles bool,
 ) *Stats1NamedAccumulator {
 
-	accumulator := factory.MakeAccumulator(
+	accumulator := fac.MakeAccumulator(
 		accumulatorName,
 		groupingKey,
 		valueFieldName,
@@ -260,7 +255,7 @@ func (factory *Stats1AccumulatorFactory) MakeNamedAccumulator(
 	)
 }
 
-func (factory *Stats1AccumulatorFactory) MakeAccumulator(
+func (fac *Stats1AccumulatorFactory) MakeAccumulator(
 	accumulatorName string,
 	groupingKey string,
 	valueFieldName string,
@@ -269,10 +264,10 @@ func (factory *Stats1AccumulatorFactory) MakeAccumulator(
 	// First try percentiles, which have parameterized names.
 	percentile, ok := tryPercentileFromName(accumulatorName)
 	if ok {
-		percentileKeepersForValueFieldName := factory.percentileKeepers[valueFieldName]
+		percentileKeepersForValueFieldName := fac.percentileKeepers[valueFieldName]
 		if percentileKeepersForValueFieldName == nil {
 			percentileKeepersForValueFieldName = make(map[string]*PercentileKeeper)
-			factory.percentileKeepers[valueFieldName] = percentileKeepersForValueFieldName
+			fac.percentileKeepers[valueFieldName] = percentileKeepersForValueFieldName
 		}
 
 		percentileKeeper := percentileKeepersForValueFieldName[groupingKey]
@@ -341,7 +336,6 @@ func (acc *Stats1NullCountAccumulator) Reset() {
 	acc.count = 0
 }
 
-// ================================================================
 // Stats1DistinctCountAccumulator determines distinctness by string values.
 // Here, 4.1 and 4.10 are counted as distinct values.
 type Stats1DistinctCountAccumulator struct {
@@ -491,9 +485,8 @@ func (acc *Stats1MeanAccumulator) Ingest(value *mlrval.Mlrval) {
 func (acc *Stats1MeanAccumulator) Emit() *mlrval.Mlrval {
 	if acc.count == 0 {
 		return mlrval.VOID
-	} else {
-		return bifs.BIF_divide(acc.sum, mlrval.FromInt(acc.count))
 	}
+	return bifs.BIF_divide(acc.sum, mlrval.FromInt(acc.count))
 }
 func (acc *Stats1MeanAccumulator) Reset() {
 	acc.sum = mlrval.FromInt(0)
@@ -555,9 +548,8 @@ func (acc *Stats1MinAccumulator) Ingest(value *mlrval.Mlrval) {
 func (acc *Stats1MinAccumulator) Emit() *mlrval.Mlrval {
 	if acc.min.IsAbsent() {
 		return mlrval.VOID
-	} else {
-		return acc.min.Copy()
 	}
+	return acc.min.Copy()
 }
 func (acc *Stats1MinAccumulator) Reset() {
 	acc.min = mlrval.ABSENT
@@ -578,9 +570,8 @@ func (acc *Stats1MaxAccumulator) Ingest(value *mlrval.Mlrval) {
 func (acc *Stats1MaxAccumulator) Emit() *mlrval.Mlrval {
 	if acc.max.IsAbsent() {
 		return mlrval.VOID
-	} else {
-		return acc.max.Copy()
 	}
+	return acc.max.Copy()
 }
 func (acc *Stats1MaxAccumulator) Reset() {
 	acc.max = mlrval.ABSENT
@@ -792,7 +783,6 @@ func (acc *Stats1KurtosisAccumulator) Reset() {
 	acc.sum4 = mlrval.FromInt(0)
 }
 
-// ----------------------------------------------------------------
 // To conserve memory, percentile-keeprs on the same value-field-name (and
 // grouping-key) are shared. For example, p25,p75 on field "x".  This means
 // though that each datapoint must be ingested only once (e.g.  by the p25
diff --git a/pkg/transformers/utils/stats2_accumulators.go b/pkg/transformers/utils/stats2_accumulators.go
index a77690420..e48f7f112 100644
--- a/pkg/transformers/utils/stats2_accumulators.go
+++ b/pkg/transformers/utils/stats2_accumulators.go
@@ -1,6 +1,4 @@
-// ================================================================
 // For stats2
-// ================================================================
 
 package utils
 
@@ -107,7 +105,7 @@ func ValidateStats2AccumulatorName(
 	return false
 }
 
-func (factory *Stats2AccumulatorFactory) Make(
+func (fac *Stats2AccumulatorFactory) Make(
 	valueFieldName1 string,
 	valueFieldName2 string,
 	accumulatorName string,
@@ -296,7 +294,6 @@ func (acc *Stats2LogiRegAccumulator) Fit(
 	}
 }
 
-// ================================================================
 // http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient
 // Alternatively, just use sqrt(corr) as defined above.
 
@@ -371,7 +368,6 @@ func (acc *Stats2R2Accumulator) Fit(
 ) {
 }
 
-// ================================================================
 // Shared code for Corr, Cov, CovX, and LinRegPCA.
 // Corr(X,Y) = Cov(X,Y) / sigma_X sigma_Y.
 
@@ -551,9 +547,9 @@ func (acc *Stats2CorrCovAccumulator) Populate(
 
 			l1, l2, v1, v2 := lib.GetRealSymmetricEigensystem(Q)
 
-			x_mean := acc.sumx / float64(acc.count)
-			y_mean := acc.sumy / float64(acc.count)
-			m, b, q := lib.GetLinearRegressionPCA(l1, l2, v1, v2, x_mean, y_mean)
+			xMean := acc.sumx / float64(acc.count)
+			yMean := acc.sumy / float64(acc.count)
+			m, b, q := lib.GetLinearRegressionPCA(l1, l2, v1, v2, xMean, yMean)
 
 			outrec.PutReference(keym, mlrval.FromFloat(m))
 			outrec.PutReference(keyb, mlrval.FromFloat(b))
@@ -607,9 +603,9 @@ func (acc *Stats2CorrCovAccumulator) Fit(
 
 		l1, l2, v1, v2 := lib.GetRealSymmetricEigensystem(Q)
 
-		x_mean := acc.sumx / float64(acc.count)
-		y_mean := acc.sumy / float64(acc.count)
-		acc.m, acc.b, acc.q = lib.GetLinearRegressionPCA(l1, l2, v1, v2, x_mean, y_mean)
+		xMean := acc.sumx / float64(acc.count)
+		yMean := acc.sumy / float64(acc.count)
+		acc.m, acc.b, acc.q = lib.GetLinearRegressionPCA(l1, l2, v1, v2, xMean, yMean)
 
 		acc.fitReady = true
 	}
diff --git a/pkg/transformers/utils/top_keeper.go b/pkg/transformers/utils/top_keeper.go
index 4e74ee23a..584f0c417 100644
--- a/pkg/transformers/utils/top_keeper.go
+++ b/pkg/transformers/utils/top_keeper.go
@@ -1,6 +1,4 @@
-// ================================================================
 // Data structure for mlr top: just a decorated array.
-// ================================================================
 
 package utils
 
@@ -36,7 +34,6 @@ func (keeper *TopKeeper) GetSize() int64 {
 	return keeper.size
 }
 
-// ----------------------------------------------------------------
 // Cases:
 // 1. array size <  capacity
 //    * find destidx
diff --git a/pkg/transformers/utils/window_keeper.go b/pkg/transformers/utils/window_keeper.go
index c19b33a2a..4d1cc9873 100644
--- a/pkg/transformers/utils/window_keeper.go
+++ b/pkg/transformers/utils/window_keeper.go
@@ -62,9 +62,8 @@ func (wk *TWindowKeeper) Get(
 	} else if index > 0 {
 		lib.InternalCodingErrorIf(index > wk.numForward)
 		return wk.itemsForward[index-1]
-	} else {
-		index = -index
-		lib.InternalCodingErrorIf(index > wk.numBackward)
-		return wk.itemsBackward[index-1]
 	}
+	index = -index
+	lib.InternalCodingErrorIf(index > wk.numBackward)
+	return wk.itemsBackward[index-1]
 }
diff --git a/pkg/types/mlrval_typing.go b/pkg/types/mlrval_typing.go
index 67b914d33..a8df0abd9 100644
--- a/pkg/types/mlrval_typing.go
+++ b/pkg/types/mlrval_typing.go
@@ -1,7 +1,5 @@
-// ================================================================
 // Support for things like 'num x = $a + $b' in the DSL, wherein we check types
 // at assignment time.
-// ================================================================
 
 package types
 
@@ -23,7 +21,7 @@ func NewTypeGatedMlrvalName(
 ) (*TypeGatedMlrvalName, error) {
 	typeMask, ok := mlrval.TypeNameToMask(typeName)
 	if !ok {
-		return nil, fmt.Errorf(`mlr: couldn't resolve type name "%s"`, typeName)
+		return nil, fmt.Errorf(`couldn't resolve type name "%s"`, typeName)
 	}
 	return &TypeGatedMlrvalName{
 		Name:     name,
@@ -36,12 +34,11 @@ func (tname *TypeGatedMlrvalName) Check(value *mlrval.Mlrval) error {
 	bit := value.GetTypeBit()
 	if bit&tname.TypeMask != 0 {
 		return nil
-	} else {
-		return fmt.Errorf(
-			"mlr: couldn't assign variable %s %s from value %s %s",
-			tname.TypeName, tname.Name, value.GetTypeName(), value.String(),
-		)
 	}
+	return fmt.Errorf(
+		"couldn't assign variable %s %s from value %s %s",
+		tname.TypeName, tname.Name, value.GetTypeName(), value.String(),
+	)
 }
 
 type TypeGatedMlrvalVariable struct {
diff --git a/scripts/early-multi-language-timings/catgo.go b/scripts/early-multi-language-timings/catgo.go
index ff32200ce..8e0dab4f6 100644
--- a/scripts/early-multi-language-timings/catgo.go
+++ b/scripts/early-multi-language-timings/catgo.go
@@ -20,9 +20,8 @@ func main() {
 	}
 	if ok {
 		os.Exit(0)
-	} else {
-		os.Exit(1)
 	}
+	os.Exit(1)
 }
 
 func handle(fileName string) (ok bool) {
@@ -50,9 +49,8 @@ func handle(fileName string) (ok bool) {
 				inputStream.Close()
 			}
 			return false
-		} else {
-			writer.WriteString(line)
 		}
+		writer.WriteString(line)
 	}
 	if fileName != "-" {
 		inputStream.Close()
@@ -61,3 +59,4 @@ func handle(fileName string) (ok bool) {
 
 	return true
 }
+
diff --git a/scripts/early-multi-language-timings/catgo2.go b/scripts/early-multi-language-timings/catgo2.go
index a7c933c0e..ab0871398 100644
--- a/scripts/early-multi-language-timings/catgo2.go
+++ b/scripts/early-multi-language-timings/catgo2.go
@@ -20,9 +20,8 @@ func main() {
 	}
 	if ok {
 		os.Exit(0)
-	} else {
-		os.Exit(1)
 	}
+	os.Exit(1)
 }
 
 func handle(fileName string) (ok bool) {
@@ -50,3 +49,4 @@ func handle(fileName string) (ok bool) {
 
 	return true
 }
+
diff --git a/scripts/early-multi-language-timings/cutgo.go b/scripts/early-multi-language-timings/cutgo.go
index 0d0b06179..099975dd6 100644
--- a/scripts/early-multi-language-timings/cutgo.go
+++ b/scripts/early-multi-language-timings/cutgo.go
@@ -23,9 +23,8 @@ func main() {
 	}
 	if ok {
 		os.Exit(0)
-	} else {
-		os.Exit(1)
 	}
+	os.Exit(1)
 }
 
 func handle(fileName string, includeFields []string) (ok bool) {
@@ -52,146 +51,145 @@ func handle(fileName string, includeFields []string) (ok bool) {
 				inputStream.Close()
 			}
 			return false
-		} else {
-
-			// continue
-			// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
-			// TIME IN SECONDS 0.228 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.226 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.222 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.221 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.228 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.226 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.225 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.227 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.222 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 0.223 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			//
-			// avg 0.2248
-			// cumu  4%
-
-			// Line to map
-			mymap := make(map[string]string)
-			fields := strings.Split(line, ",")
-			for _, field := range fields {
-				kvps := strings.SplitN(field, "=", 2)
-				mymap[kvps[0]] = kvps[1]
-			}
-
-			// continue
-			// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
-			// TIME IN SECONDS 3.055 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.837 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.905 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.817 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.766 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.810 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.748 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.744 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.765 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.722 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			//
-			// avg 2.8169
-			// cumu 58%
-			// delta 54%
-
-			// Map-to-map transform
-			newmap := make(map[string]string)
-			for _, includeField := range includeFields {
-				value, present := mymap[includeField]
-				if present {
-					newmap[includeField] = value
-				}
-			}
-
-			// continue
-			// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
-			// TIME IN SECONDS 3.101 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.028 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.992 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.005 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.991 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.986 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.992 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.992 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.989 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 2.991 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			//
-			// avg 3.0067
-			// cumu 62%
-			// delta  4%
-
-			// Map to string
-
-			// Faster to assemble in memory with single fmt.Println at the end,
-			// than multiple fmt.Print through the fields.
-			var buffer bytes.Buffer
-			i := 0
-			for k, v := range newmap {
-				if i > 0 {
-					buffer.WriteString(",")
-				}
-				buffer.WriteString(k)
-				buffer.WriteString("=")
-				buffer.WriteString(v)
-				i++
-			}
-
-			// continue
-			// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
-			// TIME IN SECONDS 3.821 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.443 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.491 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.421 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.412 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.470 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.438 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.555 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.637 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.538 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			//
-			// avg 3.5226
-			// cumu 73%
-			// delta 11%
-
-			buffer.WriteString("\n")
-
-			// continue
-			// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
-			// TIME IN SECONDS 3.769 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.539 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.539 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.486 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.518 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.492 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.506 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.486 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.495 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 3.560 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			//
-			// avg 3.539
-			// cumu 73%
-			// delta  0%
-
-			os.Stdout.WriteString(buffer.String())
-
-			// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
-			// TIME IN SECONDS 4.976 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.727 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.760 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.747 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.826 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.849 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.841 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.747 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.841 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			// TIME IN SECONDS 4.765 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
-			//
-			// avg 4.8079
-			// cumu 100%
-			// delta 27%
-
 		}
+
+		// continue
+		// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
+		// TIME IN SECONDS 0.228 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.226 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.222 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.221 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.228 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.226 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.225 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.227 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.222 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 0.223 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		//
+		// avg 0.2248
+		// cumu  4%
+
+		// Line to map
+		mymap := make(map[string]string)
+		fields := strings.Split(line, ",")
+		for _, field := range fields {
+			kvps := strings.SplitN(field, "=", 2)
+			mymap[kvps[0]] = kvps[1]
+		}
+
+		// continue
+		// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
+		// TIME IN SECONDS 3.055 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.837 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.905 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.817 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.766 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.810 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.748 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.744 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.765 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.722 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		//
+		// avg 2.8169
+		// cumu 58%
+		// delta 54%
+
+		// Map-to-map transform
+		newmap := make(map[string]string)
+		for _, includeField := range includeFields {
+			value, present := mymap[includeField]
+			if present {
+				newmap[includeField] = value
+			}
+		}
+
+		// continue
+		// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
+		// TIME IN SECONDS 3.101 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.028 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.992 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.005 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.991 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.986 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.992 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.992 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.989 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 2.991 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		//
+		// avg 3.0067
+		// cumu 62%
+		// delta  4%
+
+		// Map to string
+
+		// Faster to assemble in memory with single fmt.Println at the end,
+		// than multiple fmt.Print through the fields.
+		var buffer bytes.Buffer
+		i := 0
+		for k, v := range newmap {
+			if i > 0 {
+				buffer.WriteString(",")
+			}
+			buffer.WriteString(k)
+			buffer.WriteString("=")
+			buffer.WriteString(v)
+			i++
+		}
+
+		// continue
+		// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
+		// TIME IN SECONDS 3.821 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.443 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.491 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.421 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.412 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.470 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.438 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.555 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.637 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.538 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		//
+		// avg 3.5226
+		// cumu 73%
+		// delta 11%
+
+		buffer.WriteString("\n")
+
+		// continue
+		// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
+		// TIME IN SECONDS 3.769 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.539 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.539 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.486 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.518 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.492 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.506 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.486 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.495 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 3.560 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		//
+		// avg 3.539
+		// cumu 73%
+		// delta  0%
+
+		os.Stdout.WriteString(buffer.String())
+
+		// $ repeat 10 justtime cutgo ccode,milex,year,cinc ../c/nmc1.dkvp > /dev/null
+		// TIME IN SECONDS 4.976 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.727 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.760 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.747 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.826 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.849 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.841 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.747 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.841 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		// TIME IN SECONDS 4.765 -- cutgo ccode,milex,year,cinc ../c/nmc1.dkvp
+		//
+		// avg 4.8079
+		// cumu 100%
+		// delta 27%
+
 	}
 	if fileName != "-" {
 		inputStream.Close()
@@ -199,3 +197,4 @@ func handle(fileName string, includeFields []string) (ok bool) {
 
 	return true
 }
+
diff --git a/scripts/early-multi-language-timings/mand/mandg.go b/scripts/early-multi-language-timings/mand/mandg.go
index e5f4c9912..6711c480f 100644
--- a/scripts/early-multi-language-timings/mand/mandg.go
+++ b/scripts/early-multi-language-timings/mand/mandg.go
@@ -51,8 +51,8 @@ func get_point_plot(cr float64, ci float64, maxits int) string {
 	}
 	if !escaped {
 		return "."
-	} else {
-		level := (iti / levelstep) % len(chars)
-		return chars[level : level+1]
 	}
+	level := (iti / levelstep) % len(chars)
+	return chars[level : level+1]
 }
+
diff --git a/test/cases/dsl-argpass-typedecl/0002/experr b/test/cases/dsl-argpass-typedecl/0002/experr
index 49d1b3f4b..49cdce4a4 100644
--- a/test/cases/dsl-argpass-typedecl/0002/experr
+++ b/test/cases/dsl-argpass-typedecl/0002/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int i from value float 0.34679014
\ No newline at end of file
+mlr: couldn't assign variable int i from value float 0.34679014
diff --git a/test/cases/dsl-argpass-typedecl/0003/experr b/test/cases/dsl-argpass-typedecl/0003/experr
index 88075a591..93b3d02d8 100644
--- a/test/cases/dsl-argpass-typedecl/0003/experr
+++ b/test/cases/dsl-argpass-typedecl/0003/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int function return value from value float 3.79679014
\ No newline at end of file
+mlr: couldn't assign variable int function return value from value float 3.79679014
diff --git a/test/cases/dsl-argpass-typedecl/0004/experr b/test/cases/dsl-argpass-typedecl/0004/experr
index e3de7b5d2..8289c8c80 100644
--- a/test/cases/dsl-argpass-typedecl/0004/experr
+++ b/test/cases/dsl-argpass-typedecl/0004/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int function return value from value float 4.45000000
\ No newline at end of file
+mlr: couldn't assign variable int function return value from value float 4.45000000
diff --git a/test/cases/dsl-argpass-typedecl/0005/experr b/test/cases/dsl-argpass-typedecl/0005/experr
index 22ff28ed1..a5c43fc43 100644
--- a/test/cases/dsl-argpass-typedecl/0005/experr
+++ b/test/cases/dsl-argpass-typedecl/0005/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int function return value from value error (error)
\ No newline at end of file
+couldn't assign variable int function return value from value error (error)
\ No newline at end of file
diff --git a/test/cases/dsl-lashed-emitp-singles/0013/experr b/test/cases/dsl-lashed-emitp-singles/0013/experr
index 80f96d7f5..b6863f384 100644
--- a/test/cases/dsl-lashed-emitp-singles/0013/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0013/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 3 column 11.
+mlr: Parse error on token "[" at line 3 column 11.
 Please check for missing semicolon.
 Expected one of:
   ; } ,
diff --git a/test/cases/dsl-lashed-emitp-singles/0014/experr b/test/cases/dsl-lashed-emitp-singles/0014/experr
index 644e6ff58..aad0e0b0d 100644
--- a/test/cases/dsl-lashed-emitp-singles/0014/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0014/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 3 column 12.
+mlr: Parse error on token "[" at line 3 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0024/experr b/test/cases/dsl-lashed-emitp-singles/0024/experr
index 05130c811..103720c6b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0024/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0024/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 12.
+mlr: Parse error on token "[" at line 4 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0026/experr b/test/cases/dsl-lashed-emitp-singles/0026/experr
index 05130c811..103720c6b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0026/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0026/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 12.
+mlr: Parse error on token "[" at line 4 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0027/experr b/test/cases/dsl-lashed-emitp-singles/0027/experr
index 05130c811..103720c6b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0027/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0027/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 12.
+mlr: Parse error on token "[" at line 4 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0029/experr b/test/cases/dsl-lashed-emitp-singles/0029/experr
index cc3420ddb..20b89bb3b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0029/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0029/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 11.
+mlr: Parse error on token "[" at line 4 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0031/experr b/test/cases/dsl-lashed-emitp-singles/0031/experr
index cc3420ddb..20b89bb3b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0031/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0031/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 11.
+mlr: Parse error on token "[" at line 4 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0032/experr b/test/cases/dsl-lashed-emitp-singles/0032/experr
index cc3420ddb..20b89bb3b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0032/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0032/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 11.
+mlr: Parse error on token "[" at line 4 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0033/experr b/test/cases/dsl-lashed-emitp-singles/0033/experr
index 64b79d87c..52f794bfc 100644
--- a/test/cases/dsl-lashed-emitp-singles/0033/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0033/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 10 column 11.
+mlr: Parse error on token "[" at line 10 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0037/experr b/test/cases/dsl-lashed-emitp-singles/0037/experr
index cc3420ddb..20b89bb3b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0037/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0037/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 11.
+mlr: Parse error on token "[" at line 4 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0038/experr b/test/cases/dsl-lashed-emitp-singles/0038/experr
index cc3420ddb..20b89bb3b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0038/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0038/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 11.
+mlr: Parse error on token "[" at line 4 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0039/experr b/test/cases/dsl-lashed-emitp-singles/0039/experr
index cc3420ddb..20b89bb3b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0039/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0039/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 11.
+mlr: Parse error on token "[" at line 4 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0040/experr b/test/cases/dsl-lashed-emitp-singles/0040/experr
index cc3420ddb..20b89bb3b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0040/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0040/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 11.
+mlr: Parse error on token "[" at line 4 column 11.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0041/experr b/test/cases/dsl-lashed-emitp-singles/0041/experr
index e710ce4c1..ee5910d36 100644
--- a/test/cases/dsl-lashed-emitp-singles/0041/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0041/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 10 column 12.
+mlr: Parse error on token "[" at line 10 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0045/experr b/test/cases/dsl-lashed-emitp-singles/0045/experr
index 05130c811..103720c6b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0045/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0045/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 12.
+mlr: Parse error on token "[" at line 4 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0046/experr b/test/cases/dsl-lashed-emitp-singles/0046/experr
index 05130c811..103720c6b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0046/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0046/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 12.
+mlr: Parse error on token "[" at line 4 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0047/experr b/test/cases/dsl-lashed-emitp-singles/0047/experr
index 05130c811..103720c6b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0047/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0047/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 12.
+mlr: Parse error on token "[" at line 4 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0048/experr b/test/cases/dsl-lashed-emitp-singles/0048/experr
index 05130c811..103720c6b 100644
--- a/test/cases/dsl-lashed-emitp-singles/0048/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0048/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 4 column 12.
+mlr: Parse error on token "[" at line 4 column 12.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0057/experr b/test/cases/dsl-lashed-emitp-singles/0057/experr
index f7e9303e6..d448d31b5 100644
--- a/test/cases/dsl-lashed-emitp-singles/0057/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0057/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "." at line 1 column 8.
+mlr: Parse error on token "." at line 1 column 8.
 Please check for missing semicolon.
 Expected one of:
   ␚ ; ,
diff --git a/test/cases/dsl-lashed-emitp-singles/0060/experr b/test/cases/dsl-lashed-emitp-singles/0060/experr
index d62d3ac14..cc2406ede 100644
--- a/test/cases/dsl-lashed-emitp-singles/0060/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0060/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 1 column 34.
+mlr: Parse error on token "(" at line 1 column 34.
 Please check for missing semicolon.
 Expected one of:
   ␚ ; ,
diff --git a/test/cases/dsl-lashed-emitp-singles/0062/experr b/test/cases/dsl-lashed-emitp-singles/0062/experr
index daf653af2..5990733a8 100644
--- a/test/cases/dsl-lashed-emitp-singles/0062/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0062/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 1 column 42.
+mlr: Parse error on token "(" at line 1 column 42.
 Please check for missing semicolon.
 Expected one of:
   ␚ ; ,
diff --git a/test/cases/dsl-lashed-emitp-singles/0063/experr b/test/cases/dsl-lashed-emitp-singles/0063/experr
index a7b20df24..9ded9aa1e 100644
--- a/test/cases/dsl-lashed-emitp-singles/0063/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0063/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "." at line 1 column 10.
+mlr: Parse error on token "." at line 1 column 10.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0068/experr b/test/cases/dsl-lashed-emitp-singles/0068/experr
index 3bd69bc4b..03c7d4154 100644
--- a/test/cases/dsl-lashed-emitp-singles/0068/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0068/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 1 column 44.
+mlr: Parse error on token "(" at line 1 column 44.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0074/experr b/test/cases/dsl-lashed-emitp-singles/0074/experr
index 2c3dfddc1..e0eec257a 100644
--- a/test/cases/dsl-lashed-emitp-singles/0074/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0074/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 1 column 52.
+mlr: Parse error on token "(" at line 1 column 52.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0080/experr b/test/cases/dsl-lashed-emitp-singles/0080/experr
index 2c3dfddc1..e0eec257a 100644
--- a/test/cases/dsl-lashed-emitp-singles/0080/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0080/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 1 column 52.
+mlr: Parse error on token "(" at line 1 column 52.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0086/experr b/test/cases/dsl-lashed-emitp-singles/0086/experr
index 2c3dfddc1..e0eec257a 100644
--- a/test/cases/dsl-lashed-emitp-singles/0086/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0086/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 1 column 52.
+mlr: Parse error on token "(" at line 1 column 52.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-lashed-emitp-singles/0092/experr b/test/cases/dsl-lashed-emitp-singles/0092/experr
index b9ef9c362..27ecb5395 100644
--- a/test/cases/dsl-lashed-emitp-singles/0092/experr
+++ b/test/cases/dsl-lashed-emitp-singles/0092/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "(" at line 1 column 53.
+mlr: Parse error on token "(" at line 1 column 53.
 Expected one of:
   , )
 
diff --git a/test/cases/dsl-mapvar-assignments/0003/experr b/test/cases/dsl-mapvar-assignments/0003/experr
index 4c3e56ee1..e80b8ff7b 100644
--- a/test/cases/dsl-mapvar-assignments/0003/experr
+++ b/test/cases/dsl-mapvar-assignments/0003/experr
@@ -1 +1 @@
-Cannot assign non-map to existing map; got int.
+mlr: Cannot assign non-map to existing map; got int.
diff --git a/test/cases/dsl-mapvar-assignments/0009/experr b/test/cases/dsl-mapvar-assignments/0009/experr
index 4c3e56ee1..e80b8ff7b 100644
--- a/test/cases/dsl-mapvar-assignments/0009/experr
+++ b/test/cases/dsl-mapvar-assignments/0009/experr
@@ -1 +1 @@
-Cannot assign non-map to existing map; got int.
+mlr: Cannot assign non-map to existing map; got int.
diff --git a/test/cases/dsl-mapvar-assignments/0012/experr b/test/cases/dsl-mapvar-assignments/0012/experr
index 4c3e56ee1..e80b8ff7b 100644
--- a/test/cases/dsl-mapvar-assignments/0012/experr
+++ b/test/cases/dsl-mapvar-assignments/0012/experr
@@ -1 +1 @@
-Cannot assign non-map to existing map; got int.
+mlr: Cannot assign non-map to existing map; got int.
diff --git a/test/cases/dsl-mapvar-assignments/0018/experr b/test/cases/dsl-mapvar-assignments/0018/experr
index 4c3e56ee1..e80b8ff7b 100644
--- a/test/cases/dsl-mapvar-assignments/0018/experr
+++ b/test/cases/dsl-mapvar-assignments/0018/experr
@@ -1 +1 @@
-Cannot assign non-map to existing map; got int.
+mlr: Cannot assign non-map to existing map; got int.
diff --git a/test/cases/dsl-mapvar-assignments/0024/experr b/test/cases/dsl-mapvar-assignments/0024/experr
index 4c3e56ee1..e80b8ff7b 100644
--- a/test/cases/dsl-mapvar-assignments/0024/experr
+++ b/test/cases/dsl-mapvar-assignments/0024/experr
@@ -1 +1 @@
-Cannot assign non-map to existing map; got int.
+mlr: Cannot assign non-map to existing map; got int.
diff --git a/test/cases/dsl-mapvar-assignments/0027/experr b/test/cases/dsl-mapvar-assignments/0027/experr
index 4c3e56ee1..e80b8ff7b 100644
--- a/test/cases/dsl-mapvar-assignments/0027/experr
+++ b/test/cases/dsl-mapvar-assignments/0027/experr
@@ -1 +1 @@
-Cannot assign non-map to existing map; got int.
+mlr: Cannot assign non-map to existing map; got int.
diff --git a/test/cases/dsl-mapvars-udfs-subroutines/0006/experr b/test/cases/dsl-mapvars-udfs-subroutines/0006/experr
index e82e26c86..d99ee6563 100644
--- a/test/cases/dsl-mapvars-udfs-subroutines/0006/experr
+++ b/test/cases/dsl-mapvars-udfs-subroutines/0006/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int x from value float 0.34679014
\ No newline at end of file
+mlr: couldn't assign variable int x from value float 0.34679014
diff --git a/test/cases/dsl-mapvars-udfs-subroutines/0008/experr b/test/cases/dsl-mapvars-udfs-subroutines/0008/experr
index e82e26c86..d99ee6563 100644
--- a/test/cases/dsl-mapvars-udfs-subroutines/0008/experr
+++ b/test/cases/dsl-mapvars-udfs-subroutines/0008/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int x from value float 0.34679014
\ No newline at end of file
+mlr: couldn't assign variable int x from value float 0.34679014
diff --git a/test/cases/dsl-mapvars-udfs-subroutines/0010/experr b/test/cases/dsl-mapvars-udfs-subroutines/0010/experr
index e82e26c86..d99ee6563 100644
--- a/test/cases/dsl-mapvars-udfs-subroutines/0010/experr
+++ b/test/cases/dsl-mapvars-udfs-subroutines/0010/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int x from value float 0.34679014
\ No newline at end of file
+mlr: couldn't assign variable int x from value float 0.34679014
diff --git a/test/cases/dsl-mapvars-udfs-subroutines/0011/experr b/test/cases/dsl-mapvars-udfs-subroutines/0011/experr
index 23c61d240..5ee09d0dc 100644
--- a/test/cases/dsl-mapvars-udfs-subroutines/0011/experr
+++ b/test/cases/dsl-mapvars-udfs-subroutines/0011/experr
@@ -1 +1 @@
-mlr: couldn't assign variable int function return value from value absent (absent)
\ No newline at end of file
+mlr: couldn't assign variable int function return value from value absent (absent)
diff --git a/test/cases/dsl-parameterized-emit/0048/experr b/test/cases/dsl-parameterized-emit/0048/experr
index 690eed933..f752e4b06 100644
--- a/test/cases/dsl-parameterized-emit/0048/experr
+++ b/test/cases/dsl-parameterized-emit/0048/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 1 column 24.
+mlr: Parse error on token "[" at line 1 column 24.
 Please check for missing semicolon.
 Expected one of:
   ; } ,
diff --git a/test/cases/dsl-parameterized-emit/0056/experr b/test/cases/dsl-parameterized-emit/0056/experr
index 21f7839bc..7d6322d42 100644
--- a/test/cases/dsl-parameterized-emit/0056/experr
+++ b/test/cases/dsl-parameterized-emit/0056/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "[" at line 1 column 28.
+mlr: Parse error on token "[" at line 1 column 28.
 Please check for missing semicolon.
 Expected one of:
   ; } ,
diff --git a/test/cases/dsl-parse/0113/experr b/test/cases/dsl-parse/0113/experr
index 4ee8f06f8..bb0786020 100644
--- a/test/cases/dsl-parse/0113/experr
+++ b/test/cases/dsl-parse/0113/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "`" at line 20 column 3.
+mlr: Parse error on token "`" at line 20 column 3.
 Please check for missing semicolon.
 Expected one of:
   ; { } unset filter print printn eprint eprintn dump edump tee emitf emit1
diff --git a/test/cases/dsl-parse/0114/experr b/test/cases/dsl-parse/0114/experr
index 4f09b514a..bd5d50af6 100644
--- a/test/cases/dsl-parse/0114/experr
+++ b/test/cases/dsl-parse/0114/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "x" at line 20 column 5.
+mlr: Parse error on token "x" at line 20 column 5.
 Please check for missing semicolon.
 Expected one of:
   ; { } = > >> | ( ||= ^^= &&= ??= ???= |= &= ^= <<= >>= >>>= += .= -= *=
diff --git a/test/cases/dsl-subr/0002/experr b/test/cases/dsl-subr/0002/experr
index e808f7e5e..e721da530 100644
--- a/test/cases/dsl-subr/0002/experr
+++ b/test/cases/dsl-subr/0002/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "" at line 2 column 1.
+mlr: Parse error on token "" at line 2 column 1.
 Expected one of:
   (
 
diff --git a/test/cases/dsl-subr/0008/experr b/test/cases/dsl-subr/0008/experr
index 5ee27e996..e5f7d1456 100644
--- a/test/cases/dsl-subr/0008/experr
+++ b/test/cases/dsl-subr/0008/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "" at line 2 column 1.
+mlr: Parse error on token "" at line 2 column 1.
 Expected one of:
   {
 
diff --git a/test/cases/dsl-trailing-commas/0003/experr b/test/cases/dsl-trailing-commas/0003/experr
index fb17dca2b..5c8a872ed 100644
--- a/test/cases/dsl-trailing-commas/0003/experr
+++ b/test/cases/dsl-trailing-commas/0003/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 35.
+mlr: Parse error on token "," at line 1 column 35.
 Expected one of:
   { ( ) field_name $[ braced_field_name $[[ $[[[ full_srec oosvar_name @[
   braced_oosvar_name full_oosvar all non_sigil_name float int + - .+ .- !
diff --git a/test/cases/dsl-trailing-commas/0005/experr b/test/cases/dsl-trailing-commas/0005/experr
index 8276e7ebb..5baca101b 100644
--- a/test/cases/dsl-trailing-commas/0005/experr
+++ b/test/cases/dsl-trailing-commas/0005/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 10.
+mlr: Parse error on token "," at line 1 column 10.
 Expected one of:
   ) non_sigil_name arr bool float int map num str var funct
 
diff --git a/test/cases/dsl-trailing-commas/0007/experr b/test/cases/dsl-trailing-commas/0007/experr
index d55a81e06..fe47b26e4 100644
--- a/test/cases/dsl-trailing-commas/0007/experr
+++ b/test/cases/dsl-trailing-commas/0007/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 14.
+mlr: Parse error on token "," at line 1 column 14.
 Expected one of:
   ) non_sigil_name arr bool float int map num str var funct
 
diff --git a/test/cases/dsl-trailing-commas/0009/experr b/test/cases/dsl-trailing-commas/0009/experr
index ef385b1d3..c51b4ff90 100644
--- a/test/cases/dsl-trailing-commas/0009/experr
+++ b/test/cases/dsl-trailing-commas/0009/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 37.
+mlr: Parse error on token "," at line 1 column 37.
 Expected one of:
   { ( ) field_name $[ braced_field_name $[[ $[[[ full_srec oosvar_name @[
   braced_oosvar_name full_oosvar all non_sigil_name float int + - .+ .- !
diff --git a/test/cases/dsl-trailing-commas/0011/experr b/test/cases/dsl-trailing-commas/0011/experr
index 8276e7ebb..5baca101b 100644
--- a/test/cases/dsl-trailing-commas/0011/experr
+++ b/test/cases/dsl-trailing-commas/0011/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 10.
+mlr: Parse error on token "," at line 1 column 10.
 Expected one of:
   ) non_sigil_name arr bool float int map num str var funct
 
diff --git a/test/cases/dsl-trailing-commas/0013/experr b/test/cases/dsl-trailing-commas/0013/experr
index d55a81e06..fe47b26e4 100644
--- a/test/cases/dsl-trailing-commas/0013/experr
+++ b/test/cases/dsl-trailing-commas/0013/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 14.
+mlr: Parse error on token "," at line 1 column 14.
 Expected one of:
   ) non_sigil_name arr bool float int map num str var funct
 
diff --git a/test/cases/dsl-trailing-commas/0016/experr b/test/cases/dsl-trailing-commas/0016/experr
index f8ecc8e41..d70d21615 100644
--- a/test/cases/dsl-trailing-commas/0016/experr
+++ b/test/cases/dsl-trailing-commas/0016/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 13.
+mlr: Parse error on token "," at line 1 column 13.
 Expected one of:
   { ( ) field_name $[ braced_field_name $[[ $[[[ full_srec oosvar_name @[
   braced_oosvar_name full_oosvar all non_sigil_name float int + - .+ .- !
diff --git a/test/cases/dsl-trailing-commas/0017/experr b/test/cases/dsl-trailing-commas/0017/experr
index 745c4afcd..7edd29e44 100644
--- a/test/cases/dsl-trailing-commas/0017/experr
+++ b/test/cases/dsl-trailing-commas/0017/experr
@@ -1,5 +1,5 @@
 mlr: cannot parse DSL expression.
-Parse error on token "," at line 1 column 10.
+mlr: Parse error on token "," at line 1 column 10.
 Expected one of:
   { ( ) field_name $[ braced_field_name $[[ $[[[ full_srec oosvar_name @[
   braced_oosvar_name full_oosvar all non_sigil_name float int + - .+ .- !
diff --git a/test/cases/dsl-typedecl/0009/experr b/test/cases/dsl-typedecl/0009/experr
index 4294ddc2e..d773f96b4 100644
--- a/test/cases/dsl-typedecl/0009/experr
+++ b/test/cases/dsl-typedecl/0009/experr
@@ -1 +1 @@
-mlr: couldn't assign variable str x from value int 3
\ No newline at end of file
+mlr: couldn't assign variable str x from value int 3
diff --git a/test/cases/dsl-typedecl/0010/experr b/test/cases/dsl-typedecl/0010/experr
index 55d3b8e4d..a9603769f 100644
--- a/test/cases/dsl-typedecl/0010/experr
+++ b/test/cases/dsl-typedecl/0010/experr
@@ -1 +1 @@
-mlr: couldn't assign variable arr x from value int 3
\ No newline at end of file
+mlr: couldn't assign variable arr x from value int 3
diff --git a/test/cases/dsl-typedecl/0014/experr b/test/cases/dsl-typedecl/0014/experr
index 84cc0ab08..83d5d73ae 100644
--- a/test/cases/dsl-typedecl/0014/experr
+++ b/test/cases/dsl-typedecl/0014/experr
@@ -1 +1 @@
-mlr: couldn't assign variable str function return value from value int 6
\ No newline at end of file
+mlr: couldn't assign variable str function return value from value int 6
diff --git a/test/cases/dsl-typedecl/0015/experr b/test/cases/dsl-typedecl/0015/experr
index 2e3bd9694..16aa9509e 100644
--- a/test/cases/dsl-typedecl/0015/experr
+++ b/test/cases/dsl-typedecl/0015/experr
@@ -1 +1 @@
-mlr: couldn't assign variable arr function return value from value int 6
\ No newline at end of file
+mlr: couldn't assign variable arr function return value from value int 6
diff --git a/test/cases/io-csv-auto-unsparsify/key-change/experr b/test/cases/io-csv-auto-unsparsify/key-change/experr
index 699fbb70f..5e131b216 100644
--- a/test/cases/io-csv-auto-unsparsify/key-change/experr
+++ b/test/cases/io-csv-auto-unsparsify/key-change/experr
@@ -1,2 +1,2 @@
 mlr: CSV schema change: first keys "a,b,c"; current keys "a,X,c"
-mlr: exiting due to data error.
+mlr: exiting due to data error
diff --git a/test/cases/io-multi/0010/experr b/test/cases/io-multi/0010/experr
index 15e296abb..7430f752e 100644
--- a/test/cases/io-multi/0010/experr
+++ b/test/cases/io-multi/0010/experr
@@ -1,2 +1,2 @@
 mlr: CSV schema change: first keys "host"; current keys "df/tmp,uptime"
-mlr: exiting due to data error.
+mlr: exiting due to data error
diff --git a/test/cases/io-multi/0033/experr b/test/cases/io-multi/0033/experr
index 15e296abb..7430f752e 100644
--- a/test/cases/io-multi/0033/experr
+++ b/test/cases/io-multi/0033/experr
@@ -1,2 +1,2 @@
 mlr: CSV schema change: first keys "host"; current keys "df/tmp,uptime"
-mlr: exiting due to data error.
+mlr: exiting due to data error
diff --git a/test/cases/io-multi/0034/experr b/test/cases/io-multi/0034/experr
index 15e296abb..7430f752e 100644
--- a/test/cases/io-multi/0034/experr
+++ b/test/cases/io-multi/0034/experr
@@ -1,2 +1,2 @@
 mlr: CSV schema change: first keys "host"; current keys "df/tmp,uptime"
-mlr: exiting due to data error.
+mlr: exiting due to data error
diff --git a/test/cases/io-skip-pass-comments/pr-1346/experr b/test/cases/io-skip-pass-comments/pr-1346/experr
index 10864f8ab..112319123 100644
--- a/test/cases/io-skip-pass-comments/pr-1346/experr
+++ b/test/cases/io-skip-pass-comments/pr-1346/experr
@@ -1 +1 @@
-mlr: mlr: CSV header/data length mismatch 2 != 1 at filename test/input/pr-1346.csv row 4.
+mlr: CSV header/data length mismatch 2 != 1 at filename test/input/pr-1346.csv row 4
diff --git a/test/cases/io-skip-pass-comments/pr-1787-a/experr b/test/cases/io-skip-pass-comments/pr-1787-a/experr
index 9e02e68bc..268e4eef5 100644
--- a/test/cases/io-skip-pass-comments/pr-1787-a/experr
+++ b/test/cases/io-skip-pass-comments/pr-1787-a/experr
@@ -1 +1 @@
-mlr: parse error on line 3, column 4: bare " in non-quoted-field.
+mlr: parse error on line 3, column 4: bare " in non-quoted-field
diff --git a/test/cases/io-skip-pass-comments/pr-1787-d/experr b/test/cases/io-skip-pass-comments/pr-1787-d/experr
index f8b7d1e1a..48c2cb270 100644
--- a/test/cases/io-skip-pass-comments/pr-1787-d/experr
+++ b/test/cases/io-skip-pass-comments/pr-1787-d/experr
@@ -1 +1 @@
-mlr: for CSV, the comment prefix must be a single character.
+mlr: for CSV, the comment prefix must be a single character
diff --git a/test/cases/io-spec-tsv/0004/experr b/test/cases/io-spec-tsv/0004/experr
index a996791ac..6911642d4 100644
--- a/test/cases/io-spec-tsv/0004/experr
+++ b/test/cases/io-spec-tsv/0004/experr
@@ -1 +1 @@
-mlr: mlr: TSV header/data length mismatch 1 != 0 at filename test/cases/io-spec-tsv/0004/single-column-with-blank.tsv line 4.
+mlr: TSV header/data length mismatch 1 != 0 at filename test/cases/io-spec-tsv/0004/single-column-with-blank.tsv line 4
diff --git a/test/cases/io-tsv-auto-unsparsify/key-change/experr b/test/cases/io-tsv-auto-unsparsify/key-change/experr
index ce615563a..ca6dfc982 100644
--- a/test/cases/io-tsv-auto-unsparsify/key-change/experr
+++ b/test/cases/io-tsv-auto-unsparsify/key-change/experr
@@ -1,2 +1,2 @@
 mlr: TSV schema change: first keys "a	b	c"; current keys "a	X	c"
-mlr: exiting due to data error.
+mlr: exiting due to data error
diff --git a/test/cases/verb-label/0009/experr b/test/cases/verb-label/0009/experr
index 0933a079d..615cfe2bf 100644
--- a/test/cases/verb-label/0009/experr
+++ b/test/cases/verb-label/0009/experr
@@ -1 +1 @@
-mlr label: labels must be unique; got duplicate "d"
\ No newline at end of file
+mlr label: labels must be unique; got duplicate "d"