[Refactor] Reduce if/else nesting where possible

Also formatted empty constructor bodies to be on new lines.