minor re-usability changes to R-wrapper
rewrote submit file for vanilla