Added a Pages controller
add some test cases