Unnecessary branching of conditions removed