Minor code formatting

* Fixed indentation and whitespace inconsistencies
* Added missing semicolons