Edit static pages controller and add tests