Added handling of expiration dates.