Enumerate function variables, setup Roxygen to pass R CMD CHECK, added tests.