Revisiting this, and noticed I could clean up the logic.