improved code of how headers and footers are generated; title of each view is now only in the titlebar