Add gitattributes and cleanup

Fix some older broken events and allow for forge mods to stop an event.
Also clean up a bit of code. More things need to change