Slight refactoring in LibrarySync