Removing common part of code from cg/mkl-rci code