Source code formatting. Add missing curly braces for single line if-then-else expressions. Removed control operators and added checks to see if variables are set/not empty.