First iteration of package with all .Call replaced with Rcpp functions.