cleanup pagetype sections logic