Splitting out utility functions to own file.
keyword params
formatting and cleanup of tempfiles.
Wrapping R functions