Adding shellcheck and fixing a couple of errors.