Added pre and post processing event disatching
Deleted test images after tests
Restoired file events compatibility, factorised code