Cleaning and updating libraries