main cleanup

asdasd
add dispatchEvent
Makefile tittering