lnpm.sh refactoring