Sync mode in page load
Refactoring example layout code