Added history API and connected it to history view