I didn't read the whole thread, just want to mention:
to prevent any troubles with logical operators and boolean algebra, use brackets!
If (condition 1) and (condition 2)
or
If (condition 1) or ((condition 2) and (condition 3))
to prevent any troubles with logical operators and boolean algebra, use brackets!
If (condition 1) and (condition 2)
or
If (condition 1) or ((condition 2) and (condition 3))