Fixed some spacing in maintenance folder

Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I9657f72996358f8c1c154cea1ea97970d973723c
Merge "Fixed some spacing in maintenance folder"