The main problem as I see it is that the clause "during the term of and connection with its consulting relationship" is grammatically ill-formed, so extracted a meaning from it is not going to be easy. It might be repaired by saying "and in connection with", although there is also nothing that "its" can refer to (I suspect that it is supposed to be "this"). If the clause is changed to "during the term of and in connection with this consulting relationship", then you run into the famous and / or problem, which is that "and" has a specific technical meaning in logic (and programming), which is not the same as "or", but in common speech people use them interchangeably. It is not uncommon to find state laws addressing this by saying something like "The word 'and' shall be mean 'or', and vice versa, as the context demands" (the context is usually no help).
The "or" interpretation means that they have claim to anything you create in connection with the agreement, and also anything that you create during the term of the agreement. The "and" interpretation holds that they have claim to anything that is both created during the period of the agreement and is created in connection with the agreement. The (grammatically reformed) clause "during the term of and in connection with this consulting relationship" can be reworded to favor an "and" interpretation by rewording in one way, or an "or" interpretation by a different wording. I think I should not say what that wording is (site rules and all), which would be a job for your attorney. I can say, as a linguist, that certain other words like "both" push the interpretation in the direction of an "and" reading, and "either" favors an "or" reading.
As it stands, the two best legal defenses I can see that force the "and" interpretation with the unmodified clause are (1) that is the "strict" meaning of "and" and (2) that is almost certainly how a programmer would interpret "and", thus most likely that is what was "agreed to".