gfx extracted
removed some comments
added enum for user events