Some changes to code and vignette.