Get R operation working, among other improvements.