Revert "#3482 Some code improvement"
Revert "#3482 Some code improvement"

This reverts commit 0783bada1dd063e8eab3d5924987ac0a5cf42557.

ahmedkaludi/Accelerated-Mobile-Pages,ahmedkaludi/Accelerated-Mobile-Pages