documentation and code changes to pass CRAN checks

Code - change parameters from global to a class
Documentation - document reference classes as s4 classes