Refactored the library.