Making some changes in pages controller