Sundry fixes

These are all quite small and should be self-explanatory.

After further analysis I've concluded that the fix proposed in Issue #85 is in fact the correct solution, for now. The commit message in 44912e9 describes the state of affairs. It turns out we were in fact running over the bounds of the flat array. I suggest we continue using `std::vector` until things have stabilized and we can choose a reasonable array size at which point we switch to `std::array` which should completely eliminate the performance penalty.