Refactor StaticPages Controller