Cleaned up the R activity