Added history activity with listview. Moved function from main activity