refactoring and Added EventRepository and Parser interface with JsonToEventParser implementation