Cleaning up the event string