Refactored missing scripts with double brackets for if statements.
Refactored scripts to use  instead of backticks  for command substitution.