replace malloc with array on stack
moved all eventhandling classes to src/ui/.
Merge branch 'master' into scripting_54