Refactor some EventEntity code