Make _format_arg() a function
Drop parentheses around boolean operators
Support >2 operands for boolean operators