net.nim, events templates, fixes