Added helper method to generate title and added titles to each page