Externalize event dispatcher

Put event dispatcher module in the library folder for issue #1