Simplify and improve penalty box logic.