Moved JSON and CSV functions to their own files.