Refactoring the library and removing unneeded items