Slightly improved speed by moving all "working functions" to use arrays rather than vectors.
LatestThe user-facing functions should still return the same values, so this hopefully shouldn't break anything.
The user-facing functions should still return the same values, so this hopefully shouldn't break anything.