Added check of braces for the else/else if statements.
Updated unit test with new use cases.
Merge branch 'maint'