Added event code and transient children functionality