cleanup of lib.sh