Updated functions to avoid CRAN NOTEs close #197