Eliminate ALL redundant sendEvent() calls

And fixed so isStateChange is true only on sendEvent() calls that actually change the state of the variable/attribute