EventSystem rewritten for non-jfx testing support