cleaning up some of the type-conversion code and changing the default behavior of functions to return R objects rather than creating filesystem output.