Minor coding style changes and typo fixes

1. Switched to BASH Arithmetic expressions for some if statements that used numbers. 
2. Added ${var} as best practice
3. Minor spelling fixes