Minor tidying up. Added Rscript test