some code refactoring, and more work on LibraryWell (but not finished yet)"