implemented TimerEventDefinition, added tests and fixed/refactored where necessary