final refactored page_builder
Arg parser first refactoring: extract method.