Minor refactor - create an equality function to simplify skip logic.