Clean up edit event creation and added basic test

Change-Id: I8e07da52c7fa8e2bfe95f400f3f695eaa49912b6
Merge "Clean up edit event creation and added basic test"