Simplified if/else tree