Rewrite some parts of CustomEvent Expose some API as dll entry
Still pretty unstable, game might crash at times. Revamp build system and other small fixes