Refactor page header stuff and other things.