Updates to make CRAN compatible