Simplify(?) some logic