wip
Cleaned up scripts using shellcheck.