Changed R filenames to comply with the usual convention and also pruned some unnecessary stuff