chore(style): code style changes

Replaced single line if statements with curly wrapped statements
Replaced line expressions with if statements
Uniformized line lengths to 80 characters
Changed `if(` to `if (` for consistency

I made these changes to make the code clearer and consistent. If these changes are ok, I can go through the rest of the project and do the same so its all standardized. If not, then no worries as they are purely cosmetic