Refactor var page initialization