Fixes for R CMD CHECK. And renames for style consistency.