Refactored LibraryTests.