Moved code from preferences.cpp to jt_archive.cpp.
Added collections request API.