refactor pagebuilder init