Update for CRAN submission