layouts refactored + smartSelection for if-else-bricks