Halfway
Seems to be working
added clearEvents, all seems to be working
First changes to measure afterimage duration
All seems working except possible spacebar option when waiting for mouseclick or something