first pass at modernizing the package and readying it for CRAN submission