Finished the history page and fixed some bugs