Cleanup of the core lib.