In addition to @hkenney's comment about the complicated conditional structure, you should also avoid using `unless` because it often becomes a larger mental burden for a reader to follow than `if !foo`. They are exactly equivalent, but the positive form of `if` is normally easier to understand and much easier to manipulate.