trimmed timeout extension, added event validation and fixed comment syntax