cleanup of the library code