improved LibraryLoader class