tidy up documentation

Correct errors in package to get ready for CRAN submission