Moved pagebuilder to listener class