minor fixes including variable name change and expanded rdoc