Simplify control workflow

Simplify a bunch of boolean statement.