Create event state

@fiallega take a look at what we've done. We think it's ready for master. @znja