[refac] switched event dispatcher to use *.h and *.c files

In order to minimize the size of the build