Added CJ.dt function
Incorporated changes to codebase for better passing CRAN checks re:data.table