Start of attempt to refactor vector thingy into a template as much as
possible.  Found one thing, but probably coming upon a dead end in this
direction.