Release cleanup

This set of changes removes a few of needless type conversions when indexing into `std::vector<T>`s and when writing output.  I maintain that using `double`s to represent counters is counter-intuitive (unless the counters are expected to reach *really* high values).

We also include fixes for a few other, minor annoyances in the source tree.

Were the `double` counters just copy-paste mistakes?