OfferDatabase added. Some minor error fixes