remove broken (LP#1348559) but also unused code; thanks dcb
remove redundant check; from dcb (LP#1348614)
replace weird division plus modulo by commonly used
idiom for division with rounding up; style nitpick
in LP#1348614 by dcb (although I personally disagree,
the ternary operator was 100% clear here); arithmetic
confirmed by Natureshadow
make NELEM more widely available
fix speeds[] array access/sizing; from dcb (LP#1348614)
size_t, while here (warning: comparison between signed and unsigned)