style fixes ([[ doesn't need the x when comparing in bash, nor variable quoting since it's a builtin)