Fix and simplify Rprofile