[Misc] Simplify code