condensing controllers into pages controller and view into pages folder