Removes 'version' field from event json message.
Refactors code.