Almost done moving to rJava, read and write functions to be implemented