Split boolean logic and if/else into different sections.