Simplify some logic.