Add StaticPages controller with testing and page title detection

Rebased and changed commit message