A re-factoring of R's built-in reference classes to make the code understandable