improved apply.sh; no longer run with sudo