Cleanup restruct lib.sh