cleanup of lib and script