Refactor the library.