EventType enum from core/event.h is now copied to the javascript side with a script
Some uncommitted addpeer stuff, not sure if even complete