Modifications to pass CRAN check
Changes to correctly pass CRAN checks