Made it almost cran-compatible