First stab at global event handlers.

Do not merge this yet, this is just for review by @tehbilly 
Lets review this and see if the idea is good, if so we can refine it, and make sure its really necessary and will lead to good coding practices.