Remove Control Flag

You have a variable that is acting as a control flag for a series of boolean expressions.

Use a break or return instead.