Rewrite learner performance

To avoid undefined I create the first opts with opts.sum_as_string = "", rather than having to do if statements (see line 60).  Should I rather check for undefined?