various syntax fixes, especially catching ambiguous else warnings and missing parentheses in cases where || and && are used.