refactor page layouts