Updated pages controller