Moved all of the title-setting code into the app view