Add braces to one line if statements
Improve height calculation