[Refactor] Refactored _udpateCUsAndRelatedState()
[Perf] Minor perf improvements + minor refactoring