Refactoring of event_date functions, fixed bugs, improved checkout procedure