move some code and remove dependence on renderscript.jar in cpharm's directory