Added rprintf and did some untested implementation