Updated the library code