Code formatting fixes

- Removed unnecessary ```if``` /  ```else``` statement
- Added missing semicolons in different plaes