[All] Unified duplicate code