Fix rubocup errors and warnings

Mostly return values and replacing single-quote strings with
double-quote strings. One instance where an inner loop was moved into a
method, but the constant value it needed didn't ride along.