Refactor StaticPagesController