MISRA C 2012 Compliance Work

Adjusted to meet brace requirements