Small fixes to serialization, added some eventing