Updated the exporter to make it more generic (return an array instead of saving directly to a json file). This puts the burden of saving the data onto the user.

Updated the documentation to reflect the previously mentioned change.