separate functions to fit CRAN criteria,
python and MATLAB interface remain same,
remove initial codebook for R.
fix error