minor improvements

range-string no longer requires a subseq at the end because it now
precomputes its string length correctly

Use cond instead of case which may or may not be faster
Fixed (most of the) speed reductions introduced in the previous patch