index: sort the library and client lists