MISRA C 2012 Compliance Work

Altered to meet brace requirements and required explicit return from
void functions