Leaving only the 'if(isHalfModule)' since it is isUpgrade-dependent.