bugfix: errant and missing braces semicolons etc.

Minor code fixes