Renewed whole architecture in R and C++