Adding history support to the pages