Updates to history

Updated history database ui as well as date function. Should work now.