Tweaks, but still have errors with apply-terminal.sh script