Minor: remove hard-coded array length, simplify.