History and Database functions added and/or fixed