MISRA C 2012 Compliance work

Adjusted to meet brace compliance requirements