Add title updates to page change function