Refactor and add classes of SourceEvent.