Refactored loading and saving of events. More preparations for API requests.