lnpm.sh repair and refactor